summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug
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
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
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')
-rw-r--r--drivers/pci/hotplug/acpiphp_core.c2
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c8
-rw-r--r--drivers/pci/hotplug/acpiphp_ibm.c2
-rw-r--r--drivers/pci/hotplug/cpci_hotplug_core.c2
-rw-r--r--drivers/pci/hotplug/cpqphp_core.c4
-rw-r--r--drivers/pci/hotplug/cpqphp_ctrl.c24
-rw-r--r--drivers/pci/hotplug/cpqphp_nvram.c6
-rw-r--r--drivers/pci/hotplug/cpqphp_pci.c18
-rw-r--r--drivers/pci/hotplug/cpqphp_sysfs.c2
-rw-r--r--drivers/pci/hotplug/ibmphp_core.c10
-rw-r--r--drivers/pci/hotplug/ibmphp_ebda.c18
-rw-r--r--drivers/pci/hotplug/ibmphp_pci.c18
-rw-r--r--drivers/pci/hotplug/ibmphp_res.c8
-rw-r--r--drivers/pci/hotplug/octep_hp.c2
-rw-r--r--drivers/pci/hotplug/pciehp_core.c2
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c2
-rw-r--r--drivers/pci/hotplug/pnv_php.c2
-rw-r--r--drivers/pci/hotplug/rpaphp_slot.c2
-rw-r--r--drivers/pci/hotplug/shpchp_core.c4
-rw-r--r--drivers/pci/hotplug/shpchp_ctrl.c2
20 files changed, 69 insertions, 69 deletions
diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c
index 051af60f999a..70c95166e509 100644
--- a/drivers/pci/hotplug/acpiphp_core.c
+++ b/drivers/pci/hotplug/acpiphp_core.c
@@ -260,7 +260,7 @@ int acpiphp_register_hotplug_slot(struct acpiphp_slot *acpiphp_slot,
int retval = -ENOMEM;
char name[SLOT_NAME_SIZE];
- slot = kzalloc_obj(*slot, GFP_KERNEL);
+ slot = kzalloc_obj(*slot);
if (!slot)
goto error;
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 55620e29b457..78e3effbb32d 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -60,7 +60,7 @@ static struct acpiphp_context *acpiphp_init_context(struct acpi_device *adev)
{
struct acpiphp_context *context;
- context = kzalloc_obj(*context, GFP_KERNEL);
+ context = kzalloc_obj(*context);
if (!context)
return NULL;
@@ -279,7 +279,7 @@ static acpi_status acpiphp_add_context(acpi_handle handle, u32 lvl, void *data,
if (slot->device == device)
goto slot_found;
- slot = kzalloc_obj(struct acpiphp_slot, GFP_KERNEL);
+ slot = kzalloc_obj(struct acpiphp_slot);
if (!slot) {
acpi_lock_hp_context();
acpiphp_put_context(context);
@@ -869,7 +869,7 @@ void acpiphp_enumerate_slots(struct pci_bus *bus)
return;
handle = adev->handle;
- bridge = kzalloc_obj(struct acpiphp_bridge, GFP_KERNEL);
+ bridge = kzalloc_obj(struct acpiphp_bridge);
if (!bridge)
return;
@@ -889,7 +889,7 @@ void acpiphp_enumerate_slots(struct pci_bus *bus)
if (pci_is_root_bus(bridge->pci_bus)) {
struct acpiphp_root_context *root_context;
- root_context = kzalloc_obj(*root_context, GFP_KERNEL);
+ root_context = kzalloc_obj(*root_context);
if (!root_context)
goto err;
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
index f86e39e9dd68..f8016ed24523 100644
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -141,7 +141,7 @@ static union apci_descriptor *ibm_slot_from_id(int id)
ibm_slot_done:
if (ret) {
- ret = kmalloc_obj(union apci_descriptor, GFP_KERNEL);
+ ret = kmalloc_obj(union apci_descriptor);
if (ret)
memcpy(ret, des, sizeof(union apci_descriptor));
}
diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c
index 50793ca10526..e7cd801a2655 100644
--- a/drivers/pci/hotplug/cpci_hotplug_core.c
+++ b/drivers/pci/hotplug/cpci_hotplug_core.c
@@ -189,7 +189,7 @@ cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last)
* with the pci_hotplug subsystem.
*/
for (i = first; i <= last; ++i) {
- slot = kzalloc_obj(struct slot, GFP_KERNEL);
+ slot = kzalloc_obj(struct slot);
if (!slot) {
status = -ENOMEM;
goto error;
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index 158859352185..76e26b9a9f0d 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -593,7 +593,7 @@ static int ctrl_slot_setup(struct controller *ctrl,
slot_number = ctrl->first_slot;
while (number_of_slots) {
- slot = kzalloc_obj(*slot, GFP_KERNEL);
+ slot = kzalloc_obj(*slot);
if (!slot) {
result = -ENOMEM;
goto error;
@@ -822,7 +822,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto err_disable_device;
}
- ctrl = kzalloc_obj(struct controller, GFP_KERNEL);
+ ctrl = kzalloc_obj(struct controller);
if (!ctrl) {
rc = -ENOMEM;
goto err_disable_device;
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c
index 2c63bdc61306..040429028402 100644
--- a/drivers/pci/hotplug/cpqphp_ctrl.c
+++ b/drivers/pci/hotplug/cpqphp_ctrl.c
@@ -428,7 +428,7 @@ static struct pci_resource *do_pre_bridge_resource_split(struct pci_resource **h
/* this one isn't an aligned length, so we'll make a new entry
* and split it up.
*/
- split_node = kmalloc_obj(*split_node, GFP_KERNEL);
+ split_node = kmalloc_obj(*split_node);
if (!split_node)
return NULL;
@@ -553,7 +553,7 @@ static struct pci_resource *get_io_resource(struct pci_resource **head, u32 size
if ((node->length - (temp_dword - node->base)) < size)
continue;
- split_node = kmalloc_obj(*split_node, GFP_KERNEL);
+ split_node = kmalloc_obj(*split_node);
if (!split_node)
return NULL;
@@ -573,7 +573,7 @@ static struct pci_resource *get_io_resource(struct pci_resource **head, u32 size
/* this one is longer than we need
* so we'll make a new entry and split it up
*/
- split_node = kmalloc_obj(*split_node, GFP_KERNEL);
+ split_node = kmalloc_obj(*split_node);
if (!split_node)
return NULL;
@@ -650,7 +650,7 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz
if ((max->length - (temp_dword - max->base)) < size)
continue;
- split_node = kmalloc_obj(*split_node, GFP_KERNEL);
+ split_node = kmalloc_obj(*split_node);
if (!split_node)
return NULL;
@@ -668,7 +668,7 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz
/* this one isn't end aligned properly at the top
* so we'll make a new entry and split it up
*/
- split_node = kmalloc_obj(*split_node, GFP_KERNEL);
+ split_node = kmalloc_obj(*split_node);
if (!split_node)
return NULL;
@@ -747,7 +747,7 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size)
if ((node->length - (temp_dword - node->base)) < size)
continue;
- split_node = kmalloc_obj(*split_node, GFP_KERNEL);
+ split_node = kmalloc_obj(*split_node);
if (!split_node)
return NULL;
@@ -767,7 +767,7 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size)
/* this one is longer than we need
* so we'll make a new entry and split it up
*/
- split_node = kmalloc_obj(*split_node, GFP_KERNEL);
+ split_node = kmalloc_obj(*split_node);
if (!split_node)
return NULL;
@@ -955,7 +955,7 @@ struct pci_func *cpqhp_slot_create(u8 busnumber)
struct pci_func *new_slot;
struct pci_func *next;
- new_slot = kzalloc_obj(*new_slot, GFP_KERNEL);
+ new_slot = kzalloc_obj(*new_slot);
if (new_slot == NULL)
return new_slot;
@@ -2435,10 +2435,10 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func
/* Make copies of the nodes we are going to pass down so that
* if there is a problem,we can just use these to free resources
*/
- hold_bus_node = kmalloc_obj(*hold_bus_node, GFP_KERNEL);
- hold_IO_node = kmalloc_obj(*hold_IO_node, GFP_KERNEL);
- hold_mem_node = kmalloc_obj(*hold_mem_node, GFP_KERNEL);
- hold_p_mem_node = kmalloc_obj(*hold_p_mem_node, GFP_KERNEL);
+ hold_bus_node = kmalloc_obj(*hold_bus_node);
+ hold_IO_node = kmalloc_obj(*hold_IO_node);
+ hold_mem_node = kmalloc_obj(*hold_mem_node);
+ hold_p_mem_node = kmalloc_obj(*hold_p_mem_node);
if (!hold_bus_node || !hold_IO_node || !hold_mem_node || !hold_p_mem_node) {
kfree(hold_bus_node);
diff --git a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c
index 83c97f72ca3b..692d3cafa16d 100644
--- a/drivers/pci/hotplug/cpqphp_nvram.c
+++ b/drivers/pci/hotplug/cpqphp_nvram.c
@@ -504,7 +504,7 @@ int compaq_nvram_load(void __iomem *rom_start, struct controller *ctrl)
return 2;
while (nummem--) {
- mem_node = kmalloc_obj(struct pci_resource, GFP_KERNEL);
+ mem_node = kmalloc_obj(struct pci_resource);
if (!mem_node)
break;
@@ -561,7 +561,7 @@ int compaq_nvram_load(void __iomem *rom_start, struct controller *ctrl)
}
while (numio--) {
- io_node = kmalloc_obj(struct pci_resource, GFP_KERNEL);
+ io_node = kmalloc_obj(struct pci_resource);
if (!io_node)
break;
@@ -589,7 +589,7 @@ int compaq_nvram_load(void __iomem *rom_start, struct controller *ctrl)
}
while (numbus--) {
- bus_node = kmalloc_obj(struct pci_resource, GFP_KERNEL);
+ bus_node = kmalloc_obj(struct pci_resource);
if (!bus_node)
break;
diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c
index 03e2391f6786..4ccd5294c545 100644
--- a/drivers/pci/hotplug/cpqphp_pci.c
+++ b/drivers/pci/hotplug/cpqphp_pci.c
@@ -151,8 +151,8 @@ int cpqhp_set_irq(u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num)
struct pci_bus *fakebus;
u16 temp_word;
- fakedev = kmalloc_obj(*fakedev, GFP_KERNEL);
- fakebus = kmalloc_obj(*fakebus, GFP_KERNEL);
+ fakedev = kmalloc_obj(*fakedev);
+ fakebus = kmalloc_obj(*fakebus);
if (!fakedev || !fakebus) {
kfree(fakedev);
kfree(fakebus);
@@ -721,7 +721,7 @@ int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func)
pci_bus_read_config_byte(pci_bus, devfn, PCI_SECONDARY_BUS, &secondary_bus);
pci_bus_read_config_byte(pci_bus, devfn, PCI_SUBORDINATE_BUS, &temp_byte);
- bus_node = kmalloc_obj(*bus_node, GFP_KERNEL);
+ bus_node = kmalloc_obj(*bus_node);
if (!bus_node)
return -ENOMEM;
@@ -736,7 +736,7 @@ int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func)
pci_bus_read_config_byte(pci_bus, devfn, PCI_IO_LIMIT, &b_length);
if ((b_base <= b_length) && (save_command & 0x01)) {
- io_node = kmalloc_obj(*io_node, GFP_KERNEL);
+ io_node = kmalloc_obj(*io_node);
if (!io_node)
return -ENOMEM;
@@ -752,7 +752,7 @@ int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func)
pci_bus_read_config_word(pci_bus, devfn, PCI_MEMORY_LIMIT, &w_length);
if ((w_base <= w_length) && (save_command & 0x02)) {
- mem_node = kmalloc_obj(*mem_node, GFP_KERNEL);
+ mem_node = kmalloc_obj(*mem_node);
if (!mem_node)
return -ENOMEM;
@@ -1294,7 +1294,7 @@ int cpqhp_find_available_resources(struct controller *ctrl, void __iomem *rom_st
temp_dword = io_base + io_length;
if ((io_base) && (temp_dword < 0x10000)) {
- io_node = kmalloc_obj(*io_node, GFP_KERNEL);
+ io_node = kmalloc_obj(*io_node);
if (!io_node)
return -ENOMEM;
@@ -1316,7 +1316,7 @@ int cpqhp_find_available_resources(struct controller *ctrl, void __iomem *rom_st
/* If we've got a valid memory base, use it */
temp_dword = mem_base + mem_length;
if ((mem_base) && (temp_dword < 0x10000)) {
- mem_node = kmalloc_obj(*mem_node, GFP_KERNEL);
+ mem_node = kmalloc_obj(*mem_node);
if (!mem_node)
return -ENOMEM;
@@ -1341,7 +1341,7 @@ int cpqhp_find_available_resources(struct controller *ctrl, void __iomem *rom_st
*/
temp_dword = pre_mem_base + pre_mem_length;
if ((pre_mem_base) && (temp_dword < 0x10000)) {
- p_mem_node = kmalloc_obj(*p_mem_node, GFP_KERNEL);
+ p_mem_node = kmalloc_obj(*p_mem_node);
if (!p_mem_node)
return -ENOMEM;
@@ -1366,7 +1366,7 @@ int cpqhp_find_available_resources(struct controller *ctrl, void __iomem *rom_st
* populated slots that don't have PCI-PCI bridges
*/
if (secondary_bus && (secondary_bus != primary_bus)) {
- bus_node = kmalloc_obj(*bus_node, GFP_KERNEL);
+ bus_node = kmalloc_obj(*bus_node);
if (!bus_node)
return -ENOMEM;
diff --git a/drivers/pci/hotplug/cpqphp_sysfs.c b/drivers/pci/hotplug/cpqphp_sysfs.c
index 055fff069ce3..ca153c626942 100644
--- a/drivers/pci/hotplug/cpqphp_sysfs.c
+++ b/drivers/pci/hotplug/cpqphp_sysfs.c
@@ -134,7 +134,7 @@ static int open(struct inode *inode, struct file *file)
int retval = -ENOMEM;
mutex_lock(&cpqphp_mutex);
- dbg = kmalloc_obj(*dbg, GFP_KERNEL);
+ dbg = kmalloc_obj(*dbg);
if (!dbg)
goto exit;
dbg->data = kmalloc(MAX_OUTPUT, GFP_KERNEL);
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;
diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c
index bfd9f11c2d39..49575cb2a2dc 100644
--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -57,7 +57,7 @@ static int ebda_rio_table(void);
static struct ebda_hpc_list * __init alloc_ebda_hpc_list(void)
{
- return kzalloc_obj(struct ebda_hpc_list, GFP_KERNEL);
+ return kzalloc_obj(struct ebda_hpc_list);
}
static struct controller *alloc_ebda_hpc(u32 slot_count, u32 bus_count)
@@ -66,16 +66,16 @@ static struct controller *alloc_ebda_hpc(u32 slot_count, u32 bus_count)
struct ebda_hpc_slot *slots;
struct ebda_hpc_bus *buses;
- controller = kzalloc_obj(struct controller, GFP_KERNEL);
+ controller = kzalloc_obj(struct controller);
if (!controller)
goto error;
- slots = kzalloc_objs(struct ebda_hpc_slot, slot_count, GFP_KERNEL);
+ slots = kzalloc_objs(struct ebda_hpc_slot, slot_count);
if (!slots)
goto error_contr;
controller->slots = slots;
- buses = kzalloc_objs(struct ebda_hpc_bus, bus_count, GFP_KERNEL);
+ buses = kzalloc_objs(struct ebda_hpc_bus, bus_count);
if (!buses)
goto error_slots;
controller->buses = buses;
@@ -98,12 +98,12 @@ static void free_ebda_hpc(struct controller *controller)
static struct ebda_rsrc_list * __init alloc_ebda_rsrc_list(void)
{
- return kzalloc_obj(struct ebda_rsrc_list, GFP_KERNEL);
+ return kzalloc_obj(struct ebda_rsrc_list);
}
static struct ebda_pci_rsrc *alloc_ebda_pci_rsrc(void)
{
- return kzalloc_obj(struct ebda_pci_rsrc, GFP_KERNEL);
+ return kzalloc_obj(struct ebda_pci_rsrc);
}
static void __init print_bus_info(void)
@@ -409,7 +409,7 @@ static int __init ebda_rio_table(void)
// we do concern about rio details
for (i = 0; i < rio_table_ptr->riodev_count; i++) {
- rio_detail_ptr = kzalloc_obj(struct rio_detail, GFP_KERNEL);
+ rio_detail_ptr = kzalloc_obj(struct rio_detail);
if (!rio_detail_ptr)
return -ENOMEM;
rio_detail_ptr->rio_node_id = readb(io_mem + offset);
@@ -462,7 +462,7 @@ static int __init combine_wpg_for_chassis(void)
list_for_each_entry(rio_detail_ptr, &rio_vg_head, rio_detail_list) {
opt_rio_ptr = search_opt_vg(rio_detail_ptr->chassis_num);
if (!opt_rio_ptr) {
- opt_rio_ptr = kzalloc_obj(struct opt_rio, GFP_KERNEL);
+ opt_rio_ptr = kzalloc_obj(struct opt_rio);
if (!opt_rio_ptr)
return -ENOMEM;
opt_rio_ptr->rio_type = rio_detail_ptr->rio_type;
@@ -843,7 +843,7 @@ static int __init ebda_rsrc_controller(void)
// register slots with hpc core as well as create linked list of ibm slot
for (index = 0; index < hpc_ptr->slot_count; index++) {
- tmp_slot = kzalloc_obj(*tmp_slot, GFP_KERNEL);
+ tmp_slot = kzalloc_obj(*tmp_slot);
if (!tmp_slot) {
rc = -ENOMEM;
goto error_no_slot;
diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
index f1ec9ada9faa..c4d28987af3f 100644
--- a/drivers/pci/hotplug/ibmphp_pci.c
+++ b/drivers/pci/hotplug/ibmphp_pci.c
@@ -816,7 +816,7 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
flag_io = 1;
} else {
debug("it wants %x IO behind the bridge\n", amount_needed->io);
- io = kzalloc_obj(*io, GFP_KERNEL);
+ io = kzalloc_obj(*io);
if (!io) {
retval = -ENOMEM;
@@ -838,7 +838,7 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
flag_mem = 1;
} else {
debug("it wants %x memory behind the bridge\n", amount_needed->mem);
- mem = kzalloc_obj(*mem, GFP_KERNEL);
+ mem = kzalloc_obj(*mem);
if (!mem) {
retval = -ENOMEM;
goto error;
@@ -859,7 +859,7 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
flag_pfmem = 1;
} else {
debug("it wants %x pfmemory behind the bridge\n", amount_needed->pfmem);
- pfmem = kzalloc_obj(*pfmem, GFP_KERNEL);
+ pfmem = kzalloc_obj(*pfmem);
if (!pfmem) {
retval = -ENOMEM;
goto error;
@@ -873,7 +873,7 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
ibmphp_add_resource(pfmem);
flag_pfmem = 1;
} else {
- mem_tmp = kzalloc_obj(*mem_tmp, GFP_KERNEL);
+ mem_tmp = kzalloc_obj(*mem_tmp);
if (!mem_tmp) {
retval = -ENOMEM;
goto error;
@@ -903,7 +903,7 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
*/
bus = ibmphp_find_res_bus(sec_number);
if (!bus) {
- bus = kzalloc_obj(*bus, GFP_KERNEL);
+ bus = kzalloc_obj(*bus);
if (!bus) {
retval = -ENOMEM;
goto error;
@@ -1076,7 +1076,7 @@ static struct res_needed *scan_behind_bridge(struct pci_func *func, u8 busno)
};
struct res_needed *amount;
- amount = kzalloc_obj(*amount, GFP_KERNEL);
+ amount = kzalloc_obj(*amount);
if (amount == NULL)
return NULL;
@@ -1630,7 +1630,7 @@ static int add_new_bus(struct bus_node *bus, struct resource_node *io, struct re
list_add(&bus->bus_list, &cur_bus->bus_list);
}
if (io) {
- io_range = kzalloc_obj(*io_range, GFP_KERNEL);
+ io_range = kzalloc_obj(*io_range);
if (!io_range)
return -ENOMEM;
@@ -1641,7 +1641,7 @@ static int add_new_bus(struct bus_node *bus, struct resource_node *io, struct re
bus->rangeIO = io_range;
}
if (mem) {
- mem_range = kzalloc_obj(*mem_range, GFP_KERNEL);
+ mem_range = kzalloc_obj(*mem_range);
if (!mem_range)
return -ENOMEM;
@@ -1652,7 +1652,7 @@ static int add_new_bus(struct bus_node *bus, struct resource_node *io, struct re
bus->rangeMem = mem_range;
}
if (pfmem) {
- pfmem_range = kzalloc_obj(*pfmem_range, GFP_KERNEL);
+ pfmem_range = kzalloc_obj(*pfmem_range);
if (!pfmem_range)
return -ENOMEM;
diff --git a/drivers/pci/hotplug/ibmphp_res.c b/drivers/pci/hotplug/ibmphp_res.c
index c05a2c05e302..e52d4acd1310 100644
--- a/drivers/pci/hotplug/ibmphp_res.c
+++ b/drivers/pci/hotplug/ibmphp_res.c
@@ -41,7 +41,7 @@ static struct bus_node * __init alloc_error_bus(struct ebda_pci_rsrc *curr, u8 b
return NULL;
}
- newbus = kzalloc_obj(struct bus_node, GFP_KERNEL);
+ newbus = kzalloc_obj(struct bus_node);
if (!newbus)
return NULL;
@@ -62,7 +62,7 @@ static struct resource_node * __init alloc_resources(struct ebda_pci_rsrc *curr)
return NULL;
}
- rs = kzalloc_obj(struct resource_node, GFP_KERNEL);
+ rs = kzalloc_obj(struct resource_node);
if (!rs)
return NULL;
@@ -81,7 +81,7 @@ static int __init alloc_bus_range(struct bus_node **new_bus, struct range_node *
u8 num_ranges = 0;
if (first_bus) {
- newbus = kzalloc_obj(struct bus_node, GFP_KERNEL);
+ newbus = kzalloc_obj(struct bus_node);
if (!newbus)
return -ENOMEM;
@@ -101,7 +101,7 @@ static int __init alloc_bus_range(struct bus_node **new_bus, struct range_node *
}
}
- newrange = kzalloc_obj(struct range_node, GFP_KERNEL);
+ newrange = kzalloc_obj(struct range_node);
if (!newrange) {
if (first_bus)
kfree(newbus);
diff --git a/drivers/pci/hotplug/octep_hp.c b/drivers/pci/hotplug/octep_hp.c
index 109513822589..a0a7f9ccb8fa 100644
--- a/drivers/pci/hotplug/octep_hp.c
+++ b/drivers/pci/hotplug/octep_hp.c
@@ -136,7 +136,7 @@ octep_hp_register_slot(struct octep_hp_controller *hp_ctrl,
struct octep_hp_slot *hp_slot;
int ret;
- hp_slot = kzalloc_obj(*hp_slot, GFP_KERNEL);
+ hp_slot = kzalloc_obj(*hp_slot);
if (!hp_slot)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index b344ccb3cbc1..1e9158d7bac7 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -55,7 +55,7 @@ static int init_slot(struct controller *ctrl)
int retval;
/* Setup hotplug slot ops */
- ops = kzalloc_obj(*ops, GFP_KERNEL);
+ ops = kzalloc_obj(*ops);
if (!ops)
return -ENOMEM;
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 33396ad0331c..4c62140a3cb4 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -1011,7 +1011,7 @@ struct controller *pcie_init(struct pcie_device *dev)
struct pci_dev *pdev = dev->port;
struct pci_bus *subordinate = pdev->subordinate;
- ctrl = kzalloc_obj(*ctrl, GFP_KERNEL);
+ ctrl = kzalloc_obj(*ctrl);
if (!ctrl)
return NULL;
diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c
index 4364f068fb72..5c020831e318 100644
--- a/drivers/pci/hotplug/pnv_php.c
+++ b/drivers/pci/hotplug/pnv_php.c
@@ -791,7 +791,7 @@ static struct pnv_php_slot *pnv_php_alloc_slot(struct device_node *dn)
if (!bus)
return NULL;
- php_slot = kzalloc_obj(*php_slot, GFP_KERNEL);
+ php_slot = kzalloc_obj(*php_slot);
if (!php_slot)
return NULL;
diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c
index 730a3d6c12ba..33ca19200c1b 100644
--- a/drivers/pci/hotplug/rpaphp_slot.c
+++ b/drivers/pci/hotplug/rpaphp_slot.c
@@ -32,7 +32,7 @@ struct slot *alloc_slot_struct(struct device_node *dn,
{
struct slot *slot;
- slot = kzalloc_obj(struct slot, GFP_KERNEL);
+ slot = kzalloc_obj(struct slot);
if (!slot)
goto error_nomem;
slot->name = kstrdup(drc_name, GFP_KERNEL);
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c
index 13687b666f7a..8d6f8eea599d 100644
--- a/drivers/pci/hotplug/shpchp_core.c
+++ b/drivers/pci/hotplug/shpchp_core.c
@@ -66,7 +66,7 @@ static int init_slots(struct controller *ctrl)
int i;
for (i = 0; i < ctrl->num_slots; i++) {
- slot = kzalloc_obj(*slot, GFP_KERNEL);
+ slot = kzalloc_obj(*slot);
if (!slot) {
retval = -ENOMEM;
goto error;
@@ -259,7 +259,7 @@ static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (acpi_get_hp_hw_control_from_firmware(pdev))
return -ENODEV;
- ctrl = kzalloc_obj(*ctrl, GFP_KERNEL);
+ ctrl = kzalloc_obj(*ctrl);
if (!ctrl)
goto err_out_none;
diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c
index 20526c1fa441..a10cdcdcbbdc 100644
--- a/drivers/pci/hotplug/shpchp_ctrl.c
+++ b/drivers/pci/hotplug/shpchp_ctrl.c
@@ -418,7 +418,7 @@ void shpchp_queue_pushbutton_work(struct work_struct *work)
struct slot *p_slot = container_of(work, struct slot, work.work);
struct pushbutton_work_info *info;
- info = kmalloc_obj(*info, GFP_KERNEL);
+ info = kmalloc_obj(*info);
if (!info) {
ctrl_err(p_slot->ctrl, "%s: Cannot allocate memory\n",
__func__);