summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug/ibmphp_core.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/pci/hotplug/ibmphp_core.c
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
lwn-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/pci/hotplug/ibmphp_core.c')
-rw-r--r--drivers/pci/hotplug/ibmphp_core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
index af4e8b032093..aca86c092d4a 100644
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -624,11 +624,11 @@ static u8 bus_structure_fixup(u8 busno)
if (pci_find_bus(0, busno) || !(ibmphp_find_same_bus_num(busno)))
return 1;
- bus = kmalloc_obj(*bus, GFP_KERNEL);
+ bus = kmalloc_obj(*bus);
if (!bus)
return 1;
- dev = kmalloc_obj(*dev, GFP_KERNEL);
+ dev = kmalloc_obj(*dev);
if (!dev) {
kfree(bus);
return 1;
@@ -986,7 +986,7 @@ static int enable_slot(struct hotplug_slot *hs)
goto error_power;
}
- slot_cur->func = kzalloc_obj(struct pci_func, GFP_KERNEL);
+ slot_cur->func = kzalloc_obj(struct pci_func);
if (!slot_cur->func) {
/* do update_slot_info here? */
rc = -ENOMEM;
@@ -1093,7 +1093,7 @@ int ibmphp_do_disable_slot(struct slot *slot_cur)
if (slot_cur->func == NULL) {
/* We need this for functions that were there on bootup */
- slot_cur->func = kzalloc_obj(struct pci_func, GFP_KERNEL);
+ slot_cur->func = kzalloc_obj(struct pci_func);
if (!slot_cur->func) {
rc = -ENOMEM;
goto error;
@@ -1187,7 +1187,7 @@ static int __init ibmphp_init(void)
info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
- ibmphp_pci_bus = kmalloc_obj(*ibmphp_pci_bus, GFP_KERNEL);
+ ibmphp_pci_bus = kmalloc_obj(*ibmphp_pci_bus);
if (!ibmphp_pci_bus) {
rc = -ENOMEM;
goto exit;