mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using
git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'
to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.
Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.
For the same reason the 'flex' versions will be done as a separate
conversion.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -194,7 +194,7 @@ int class_register(const struct class *cls)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
cp = kzalloc_obj(*cp, GFP_KERNEL);
|
||||
cp = kzalloc_obj(*cp);
|
||||
if (!cp)
|
||||
return -ENOMEM;
|
||||
klist_init(&cp->klist_devices, klist_class_dev_get, klist_class_dev_put);
|
||||
@@ -268,7 +268,7 @@ struct class *class_create(const char *name)
|
||||
struct class *cls;
|
||||
int retval;
|
||||
|
||||
cls = kzalloc_obj(*cls, GFP_KERNEL);
|
||||
cls = kzalloc_obj(*cls);
|
||||
if (!cls) {
|
||||
retval = -ENOMEM;
|
||||
goto error;
|
||||
@@ -573,7 +573,7 @@ struct class_compat *class_compat_register(const char *name)
|
||||
{
|
||||
struct class_compat *cls;
|
||||
|
||||
cls = kmalloc_obj(struct class_compat, GFP_KERNEL);
|
||||
cls = kmalloc_obj(struct class_compat);
|
||||
if (!cls)
|
||||
return NULL;
|
||||
cls->kobj = kobject_create_and_add(name, &class_kset->kobj);
|
||||
|
||||
Reference in New Issue
Block a user