diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 20:03:00 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 20:03:00 -0800 |
| commit | 32a92f8c89326985e05dce8b22d3f0aa07a3e1bd (patch) | |
| tree | 65f84985b9ed2d5cf3c5243aca78d9428e25c312 /drivers/pci/hotplug/ibmphp_ebda.c | |
| parent | 323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (diff) | |
Convert more 'alloc_obj' cases to default GFP_KERNEL argumentsHEADtorvalds/mastertorvalds/HEADmaster
This converts some of the visually simpler cases that have been split
over multiple lines. I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.
Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script. I probably had made it a bit _too_ trivial.
So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.
The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pci/hotplug/ibmphp_ebda.c')
| -rw-r--r-- | drivers/pci/hotplug/ibmphp_ebda.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c index 49575cb2a2dc..c1939b88e75b 100644 --- a/drivers/pci/hotplug/ibmphp_ebda.c +++ b/drivers/pci/hotplug/ibmphp_ebda.c @@ -352,8 +352,7 @@ int __init ibmphp_access_ebda(void) debug("now enter io table ---\n"); debug("rio blk id: %x\n", blk_id); - rio_table_ptr = kzalloc_obj(struct rio_table_hdr, - GFP_KERNEL); + rio_table_ptr = kzalloc_obj(struct rio_table_hdr); if (!rio_table_ptr) { rc = -ENOMEM; goto out; @@ -500,8 +499,7 @@ static int combine_wpg_for_expansion(void) list_for_each_entry(rio_detail_ptr, &rio_lo_head, rio_detail_list) { opt_rio_lo_ptr = search_opt_lo(rio_detail_ptr->chassis_num); if (!opt_rio_lo_ptr) { - opt_rio_lo_ptr = kzalloc_obj(struct opt_rio_lo, - GFP_KERNEL); + opt_rio_lo_ptr = kzalloc_obj(struct opt_rio_lo); if (!opt_rio_lo_ptr) return -ENOMEM; opt_rio_lo_ptr->rio_type = rio_detail_ptr->rio_type; @@ -740,8 +738,7 @@ static int __init ebda_rsrc_controller(void) bus_info_ptr2 = ibmphp_find_same_bus_num(slot_ptr->slot_bus_num); if (!bus_info_ptr2) { - bus_info_ptr1 = kzalloc_obj(struct bus_info, - GFP_KERNEL); + bus_info_ptr1 = kzalloc_obj(struct bus_info); if (!bus_info_ptr1) { rc = -ENOMEM; goto error_no_slot; |
