summaryrefslogtreecommitdiff
path: root/drivers/cdrom/cdrom.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/cdrom/cdrom.c
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlinux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
linux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.bz2
linux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip
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>
Diffstat (limited to 'drivers/cdrom/cdrom.c')
-rw-r--r--drivers/cdrom/cdrom.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index fe0f633bc655..fc049612d6dc 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -1318,7 +1318,7 @@ static int cdrom_slot_status(struct cdrom_device_info *cdi, int slot)
if (cdi->sanyo_slot)
return CDS_NO_INFO;
- info = kmalloc_obj(*info, GFP_KERNEL);
+ info = kmalloc_obj(*info);
if (!info)
return -ENOMEM;
@@ -1347,7 +1347,7 @@ int cdrom_number_of_slots(struct cdrom_device_info *cdi)
/* cdrom_read_mech_status requires a valid value for capacity: */
cdi->capacity = 0;
- info = kmalloc_obj(*info, GFP_KERNEL);
+ info = kmalloc_obj(*info);
if (!info)
return -ENOMEM;
@@ -1406,7 +1406,7 @@ static int cdrom_select_disc(struct cdrom_device_info *cdi, int slot)
return cdrom_load_unload(cdi, -1);
}
- info = kmalloc_obj(*info, GFP_KERNEL);
+ info = kmalloc_obj(*info);
if (!info)
return -ENOMEM;
@@ -2311,7 +2311,7 @@ static int cdrom_ioctl_media_changed(struct cdrom_device_info *cdi,
/* Prevent arg from speculatively bypassing the length check */
arg = array_index_nospec(arg, cdi->capacity);
- info = kmalloc_obj(*info, GFP_KERNEL);
+ info = kmalloc_obj(*info);
if (!info)
return -ENOMEM;