diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/pci | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | lwn-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')
54 files changed, 122 insertions, 122 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index e71aeecba11d..6c1ad1f542d9 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -65,7 +65,7 @@ void pci_bus_add_resource(struct pci_bus *bus, struct resource *res) { struct pci_bus_resource *bus_res; - bus_res = kzalloc_obj(struct pci_bus_resource, GFP_KERNEL); + bus_res = kzalloc_obj(struct pci_bus_resource); if (!bus_res) { dev_err(&bus->dev, "can't add %pR resource\n", res); return; diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index 3f106bd9fe7e..2c7a406b4ba8 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c @@ -945,7 +945,7 @@ static int hv_pci_irqchip_init(void) struct irq_domain *irq_domain_parent = NULL; int ret = -ENOMEM; - chip_data = kzalloc_obj(*chip_data, GFP_KERNEL); + chip_data = kzalloc_obj(*chip_data); if (!chip_data) return ret; @@ -2592,7 +2592,7 @@ static struct hv_pci_dev *new_pcichild_device(struct hv_pcibus_device *hbus, unsigned long flags; int ret; - hpdev = kzalloc_obj(*hpdev, GFP_KERNEL); + hpdev = kzalloc_obj(*hpdev); if (!hpdev) return NULL; @@ -3713,7 +3713,7 @@ static int hv_pci_probe(struct hv_device *hdev, if (!bridge) return -ENOMEM; - hbus = kzalloc_obj(*hbus, GFP_KERNEL); + hbus = kzalloc_obj(*hbus); if (!hbus) return -ENOMEM; diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c index 44bfe301b557..d4ae250d4bc6 100644 --- a/drivers/pci/controller/vmd.c +++ b/drivers/pci/controller/vmd.c @@ -270,7 +270,7 @@ static int vmd_msi_alloc(struct irq_domain *domain, unsigned int virq, struct vmd_irq *vmdirq; for (int i = 0; i < nr_irqs; ++i) { - vmdirq = kzalloc_obj(*vmdirq, GFP_KERNEL); + vmdirq = kzalloc_obj(*vmdirq); if (!vmdirq) { vmd_msi_free(domain, virq, i); return -ENOMEM; diff --git a/drivers/pci/doe.c b/drivers/pci/doe.c index 811276ae9b13..7b41da4ec11a 100644 --- a/drivers/pci/doe.c +++ b/drivers/pci/doe.c @@ -167,7 +167,7 @@ static int pci_doe_sysfs_feature_populate(struct pci_dev *pdev, xa_for_each(&doe_mb->feats, i, entry) num_features++; - attrs = kzalloc_objs(*attrs, num_features, GFP_KERNEL); + attrs = kzalloc_objs(*attrs, num_features); if (!attrs) { pci_warn(pdev, "Failed allocating the device_attribute array\n"); return -ENOMEM; @@ -641,7 +641,7 @@ static struct pci_doe_mb *pci_doe_create_mb(struct pci_dev *pdev, struct pci_doe_mb *doe_mb; int rc; - doe_mb = kzalloc_obj(*doe_mb, GFP_KERNEL); + doe_mb = kzalloc_obj(*doe_mb); if (!doe_mb) return ERR_PTR(-ENOMEM); diff --git a/drivers/pci/ecam.c b/drivers/pci/ecam.c index 8c7559e73bb6..119de32ff07b 100644 --- a/drivers/pci/ecam.c +++ b/drivers/pci/ecam.c @@ -37,7 +37,7 @@ struct pci_config_window *pci_ecam_create(struct device *dev, if (busr->start > busr->end) return ERR_PTR(-EINVAL); - cfg = kzalloc_obj(*cfg, GFP_KERNEL); + cfg = kzalloc_obj(*cfg); if (!cfg) return ERR_PTR(-ENOMEM); @@ -75,7 +75,7 @@ struct pci_config_window *pci_ecam_create(struct device *dev, } if (per_bus_mapping) { - cfg->winp = kzalloc_objs(*cfg->winp, bus_range, GFP_KERNEL); + cfg->winp = kzalloc_objs(*cfg->winp, bus_range); if (!cfg->winp) goto err_exit_malloc; } else { diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c index ccee5c6b6ad7..f9cf18aa5b34 100644 --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c @@ -525,7 +525,7 @@ static int pci_epf_mhi_edma_read_async(struct mhi_ep_cntrl *mhi_cntrl, goto err_unmap; } - transfer = kzalloc_obj(*transfer, GFP_KERNEL); + transfer = kzalloc_obj(*transfer); if (!transfer) { ret = -ENOMEM; goto err_unmap; @@ -604,7 +604,7 @@ static int pci_epf_mhi_edma_write_async(struct mhi_ep_cntrl *mhi_cntrl, goto err_unmap; } - transfer = kzalloc_obj(*transfer, GFP_KERNEL); + transfer = kzalloc_obj(*transfer); if (!transfer) { ret = -ENOMEM; goto err_unmap; diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index 69f6ac37cdd0..582938b7b4f1 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -872,7 +872,7 @@ static void pci_epf_test_bar_subrange_setup(struct pci_epf_test *epf_test, sub_size = bar->size / nsub; - submap = kzalloc_objs(*submap, nsub, GFP_KERNEL); + submap = kzalloc_objs(*submap, nsub); if (!submap) goto err; diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c index 6c14cf85d336..0f3921f28f17 100644 --- a/drivers/pci/endpoint/pci-ep-cfs.c +++ b/drivers/pci/endpoint/pci-ep-cfs.c @@ -274,7 +274,7 @@ struct config_group *pci_ep_cfs_add_epc_group(const char *name) struct config_group *group; struct pci_epc_group *epc_group; - epc_group = kzalloc_obj(*epc_group, GFP_KERNEL); + epc_group = kzalloc_obj(*epc_group); if (!epc_group) { ret = -ENOMEM; goto err; @@ -599,7 +599,7 @@ static struct config_group *pci_epf_make(struct config_group *group, char *epf_name; int index, err; - epf_group = kzalloc_obj(*epf_group, GFP_KERNEL); + epf_group = kzalloc_obj(*epf_group); if (!epf_group) return ERR_PTR(-ENOMEM); diff --git a/drivers/pci/endpoint/pci-ep-msi.c b/drivers/pci/endpoint/pci-ep-msi.c index 4625dc9827bc..51c19942a81e 100644 --- a/drivers/pci/endpoint/pci-ep-msi.c +++ b/drivers/pci/endpoint/pci-ep-msi.c @@ -67,7 +67,7 @@ int pci_epf_alloc_doorbell(struct pci_epf *epf, u16 num_db) dev_set_msi_domain(epc->dev.parent, domain); - msg = kzalloc_objs(struct pci_epf_doorbell_msg, num_db, GFP_KERNEL); + msg = kzalloc_objs(struct pci_epf_doorbell_msg, num_db); if (!msg) return -ENOMEM; diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c index d6998e637d3c..e546b3dbb240 100644 --- a/drivers/pci/endpoint/pci-epc-core.c +++ b/drivers/pci/endpoint/pci-epc-core.c @@ -982,7 +982,7 @@ __pci_epc_create(struct device *dev, const struct pci_epc_ops *ops, goto err_ret; } - epc = kzalloc_obj(*epc, GFP_KERNEL); + epc = kzalloc_obj(*epc); if (!epc) { ret = -ENOMEM; goto err_ret; diff --git a/drivers/pci/endpoint/pci-epc-mem.c b/drivers/pci/endpoint/pci-epc-mem.c index a3b5f8d1767c..6102a4af9d79 100644 --- a/drivers/pci/endpoint/pci-epc-mem.c +++ b/drivers/pci/endpoint/pci-epc-mem.c @@ -62,7 +62,7 @@ int pci_epc_multi_mem_init(struct pci_epc *epc, if (!windows || !num_windows) return -EINVAL; - epc->windows = kzalloc_objs(*epc->windows, num_windows, GFP_KERNEL); + epc->windows = kzalloc_objs(*epc->windows, num_windows); if (!epc->windows) return -ENOMEM; @@ -74,7 +74,7 @@ int pci_epc_multi_mem_init(struct pci_epc *epc, pages = windows[i].size >> page_shift; bitmap_size = BITS_TO_LONGS(pages) * sizeof(long); - mem = kzalloc_obj(*mem, GFP_KERNEL); + mem = kzalloc_obj(*mem); if (!mem) { ret = -ENOMEM; i--; diff --git a/drivers/pci/endpoint/pci-epf-core.c b/drivers/pci/endpoint/pci-epf-core.c index c44f4ddfd60b..83fd20c11238 100644 --- a/drivers/pci/endpoint/pci-epf-core.c +++ b/drivers/pci/endpoint/pci-epf-core.c @@ -535,7 +535,7 @@ struct pci_epf *pci_epf_create(const char *name) struct device *dev; int len; - epf = kzalloc_obj(*epf, GFP_KERNEL); + epf = kzalloc_obj(*epf); if (!epf) return ERR_PTR(-ENOMEM); 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__); diff --git a/drivers/pci/ide.c b/drivers/pci/ide.c index 94c20f35f86f..be74e8f0ae21 100644 --- a/drivers/pci/ide.c +++ b/drivers/pci/ide.c @@ -258,7 +258,7 @@ struct pci_ide *pci_ide_stream_alloc(struct pci_dev *pdev) if (!pdev->ide_cap) return NULL; - struct pci_ide *ide __free(kfree) = kzalloc_obj(*ide, GFP_KERNEL); + struct pci_ide *ide __free(kfree) = kzalloc_obj(*ide); if (!ide) return NULL; diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 99b939f233be..91ac4e37ecb9 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -837,7 +837,7 @@ found: pgsz &= ~(pgsz - 1); pci_write_config_dword(dev, pos + PCI_SRIOV_SYS_PGSIZE, pgsz); - iov = kzalloc_obj(*iov, GFP_KERNEL); + iov = kzalloc_obj(*iov); if (!iov) return -ENOMEM; diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 492ec76da821..9f8eb5df279e 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -696,7 +696,7 @@ void of_pci_make_dev_node(struct pci_dev *pdev) if (!name) return; - cset = kmalloc_obj(*cset, GFP_KERNEL); + cset = kmalloc_obj(*cset); if (!cset) goto out_free_name; of_changeset_init(cset); @@ -784,7 +784,7 @@ void of_pci_make_host_bridge_node(struct pci_host_bridge *bridge) if (!name) return; - cset = kmalloc_obj(*cset, GFP_KERNEL); + cset = kmalloc_obj(*cset); if (!cset) goto out_free_name; of_changeset_init(cset); diff --git a/drivers/pci/of_property.c b/drivers/pci/of_property.c index 9011f890ebf3..75a358f73e69 100644 --- a/drivers/pci/of_property.c +++ b/drivers/pci/of_property.c @@ -119,7 +119,7 @@ static int of_pci_prop_ranges(struct pci_dev *pdev, struct of_changeset *ocs, res = &pdev->resource[PCI_STD_RESOURCES]; } - rp = kzalloc_objs(*rp, num, GFP_KERNEL); + rp = kzalloc_objs(*rp, num); if (!rp) return -ENOMEM; diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c index 4ab9800c22cc..e0f546166eb8 100644 --- a/drivers/pci/p2pdma.c +++ b/drivers/pci/p2pdma.c @@ -1006,7 +1006,7 @@ struct scatterlist *pci_p2pmem_alloc_sgl(struct pci_dev *pdev, struct scatterlist *sg; void *addr; - sg = kmalloc_obj(*sg, GFP_KERNEL); + sg = kmalloc_obj(*sg); if (!sg) return NULL; diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 854597fe4eab..4d0f2cb6c695 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c @@ -1663,11 +1663,11 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) struct acpi_pci_root_ops *root_ops; struct pci_host_bridge *host; - ri = kzalloc_obj(*ri, GFP_KERNEL); + ri = kzalloc_obj(*ri); if (!ri) return NULL; - root_ops = kzalloc_obj(*root_ops, GFP_KERNEL); + root_ops = kzalloc_obj(*root_ops); if (!root_ops) { kfree(ri); return NULL; diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 206d30324dfd..dd9075403987 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -58,7 +58,7 @@ int pci_add_dynid(struct pci_driver *drv, { struct pci_dynid *dynid; - dynid = kzalloc_obj(*dynid, GFP_KERNEL); + dynid = kzalloc_obj(*dynid); if (!dynid) return -ENOMEM; @@ -203,7 +203,7 @@ static ssize_t new_id_store(struct device_driver *driver, const char *buf, return -EINVAL; if (fields != 7) { - struct pci_dev *pdev = kzalloc_obj(*pdev, GFP_KERNEL); + struct pci_dev *pdev = kzalloc_obj(*pdev); if (!pdev) return -ENOMEM; diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 4aa21fe3b13e..8479c2e1f74f 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2462,7 +2462,7 @@ void pci_pme_active(struct pci_dev *dev, bool enable) if (dev->pme_poll) { struct pci_pme_device *pme_dev; if (enable) { - pme_dev = kmalloc_obj(struct pci_pme_device, GFP_KERNEL); + pme_dev = kmalloc_obj(struct pci_pme_device); if (!pme_dev) { pci_warn(dev, "can't enable PME#\n"); return; diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 068594aa6878..d916378bc707 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -390,7 +390,7 @@ void pci_aer_init(struct pci_dev *dev) if (!dev->aer_cap) return; - dev->aer_info = kzalloc_obj(*dev->aer_info, GFP_KERNEL); + dev->aer_info = kzalloc_obj(*dev->aer_info); if (!dev->aer_info) { dev->aer_cap = 0; return; diff --git a/drivers/pci/pcie/aer_inject.c b/drivers/pci/pcie/aer_inject.c index 9c8b2dc496b9..09bfc7194ef3 100644 --- a/drivers/pci/pcie/aer_inject.c +++ b/drivers/pci/pcie/aer_inject.c @@ -300,7 +300,7 @@ static int pci_bus_set_aer_ops(struct pci_bus *bus) struct pci_bus_ops *bus_ops; unsigned long flags; - bus_ops = kmalloc_obj(*bus_ops, GFP_KERNEL); + bus_ops = kmalloc_obj(*bus_ops); if (!bus_ops) return -ENOMEM; ops = pci_bus_set_ops(bus, &aer_inj_pci_ops); @@ -360,12 +360,12 @@ static int aer_inject(struct aer_error_inj *einj) goto out_put; } - err_alloc = kzalloc_obj(struct aer_error, GFP_KERNEL); + err_alloc = kzalloc_obj(struct aer_error); if (!err_alloc) { ret = -ENOMEM; goto out_put; } - rperr_alloc = kzalloc_obj(struct aer_error, GFP_KERNEL); + rperr_alloc = kzalloc_obj(struct aer_error); if (!rperr_alloc) { ret = -ENOMEM; goto out_put; diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 83ea061f2eba..21f5d23e0b61 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -1063,7 +1063,7 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev) { struct pcie_link_state *link; - link = kzalloc_obj(*link, GFP_KERNEL); + link = kzalloc_obj(*link); if (!link) return NULL; diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c index 050d814f6eac..4996cc4789f3 100644 --- a/drivers/pci/pcie/pme.c +++ b/drivers/pci/pcie/pme.c @@ -335,7 +335,7 @@ static int pcie_pme_probe(struct pcie_device *srv) type != PCI_EXP_TYPE_ROOT_PORT) return -ENODEV; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c index f033acbd71a4..2d6aa488fe7b 100644 --- a/drivers/pci/pcie/portdrv.c +++ b/drivers/pci/pcie/portdrv.c @@ -293,7 +293,7 @@ static int pcie_device_init(struct pci_dev *pdev, int service, int irq) struct pcie_device *pcie; struct device *device; - pcie = kzalloc_obj(*pcie, GFP_KERNEL); + pcie = kzalloc_obj(*pcie); if (!pcie) return -ENOMEM; pcie->port = pdev; diff --git a/drivers/pci/pcie/ptm.c b/drivers/pci/pcie/ptm.c index d8727369e6a5..91a598ed534c 100644 --- a/drivers/pci/pcie/ptm.c +++ b/drivers/pci/pcie/ptm.c @@ -537,7 +537,7 @@ struct pci_ptm_debugfs *pcie_ptm_create_debugfs(struct device *dev, void *pdata, return NULL; } - ptm_debugfs = kzalloc_obj(*ptm_debugfs, GFP_KERNEL); + ptm_debugfs = kzalloc_obj(*ptm_debugfs); if (!ptm_debugfs) return NULL; diff --git a/drivers/pci/pcie/rcec.c b/drivers/pci/pcie/rcec.c index 531cde54d747..2bf6d9d549ba 100644 --- a/drivers/pci/pcie/rcec.c +++ b/drivers/pci/pcie/rcec.c @@ -160,7 +160,7 @@ void pci_rcec_init(struct pci_dev *dev) if (!rcec) return; - rcec_ea = kzalloc_obj(*rcec_ea, GFP_KERNEL); + rcec_ea = kzalloc_obj(*rcec_ea); if (!rcec_ea) return; diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 013334b53bfb..bccc7a4bdd79 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -53,7 +53,7 @@ static struct resource *get_pci_domain_busn_res(int domain_nr) if (r->domain_nr == domain_nr) return &r->res; - r = kzalloc_obj(*r, GFP_KERNEL); + r = kzalloc_obj(*r); if (!r) return NULL; @@ -620,7 +620,7 @@ static struct pci_bus *pci_alloc_bus(struct pci_bus *parent) { struct pci_bus *b; - b = kzalloc_obj(*b, GFP_KERNEL); + b = kzalloc_obj(*b); if (!b) return NULL; @@ -2502,7 +2502,7 @@ struct pci_dev *pci_alloc_dev(struct pci_bus *bus) { struct pci_dev *dev; - dev = kzalloc_obj(struct pci_dev, GFP_KERNEL); + dev = kzalloc_obj(struct pci_dev); if (!dev) return NULL; diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 53104f5c6378..ce36e35681e8 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c @@ -297,7 +297,7 @@ static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma) static int proc_bus_pci_open(struct inode *inode, struct file *file) { - struct pci_filp_private *fpriv = kmalloc_obj(*fpriv, GFP_KERNEL); + struct pci_filp_private *fpriv = kmalloc_obj(*fpriv); if (!fpriv) return -ENOMEM; diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index b641f60a2aa5..61f769aaa2f6 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -73,7 +73,7 @@ int pci_dev_res_add_to_list(struct list_head *head, struct pci_dev *dev, { struct pci_dev_resource *tmp; - tmp = kzalloc_obj(*tmp, GFP_KERNEL); + tmp = kzalloc_obj(*tmp); if (!tmp) return -ENOMEM; @@ -350,7 +350,7 @@ static void pdev_sort_resources(struct pci_dev *dev, struct list_head *head) continue; } - tmp = kzalloc_obj(*tmp, GFP_KERNEL); + tmp = kzalloc_obj(*tmp); if (!tmp) panic("%s: kzalloc() failed!\n", __func__); tmp->res = r; diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c index 15e98de7bdbe..787311614e5b 100644 --- a/drivers/pci/slot.c +++ b/drivers/pci/slot.c @@ -256,7 +256,7 @@ struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr, } placeholder: - slot = kzalloc_obj(*slot, GFP_KERNEL); + slot = kzalloc_obj(*slot); if (!slot) { err = -ENOMEM; goto err; diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c index c6e97d1af1a0..93ebec94b763 100644 --- a/drivers/pci/switch/switchtec.c +++ b/drivers/pci/switch/switchtec.c @@ -86,7 +86,7 @@ static struct switchtec_user *stuser_create(struct switchtec_dev *stdev) { struct switchtec_user *stuser; - stuser = kzalloc_obj(*stuser, GFP_KERNEL); + stuser = kzalloc_obj(*stuser); if (!stuser) return ERR_PTR(-ENOMEM); @@ -895,7 +895,7 @@ static int ioctl_event_summary(struct switchtec_dev *stdev, u32 reg; int ret = 0; - s = kzalloc_obj(*s, GFP_KERNEL); + s = kzalloc_obj(*s); if (!s) return -ENOMEM; diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c index 21204da24e73..d9383bf541e7 100644 --- a/drivers/pci/vgaarb.c +++ b/drivers/pci/vgaarb.c @@ -735,7 +735,7 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev) u16 cmd; /* Allocate structure */ - vgadev = kzalloc_obj(struct vga_device, GFP_KERNEL); + vgadev = kzalloc_obj(struct vga_device); if (vgadev == NULL) { vgaarb_err(&pdev->dev, "failed to allocate VGA arbiter data\n"); /* @@ -1385,7 +1385,7 @@ static int vga_arb_open(struct inode *inode, struct file *file) pr_debug("%s\n", __func__); - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (priv == NULL) return -ENOMEM; spin_lock_init(&priv->lock); diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index bbb43539a2b0..b8aaa292c3e7 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c @@ -462,8 +462,8 @@ static int pcifront_scan_root(struct pcifront_device *pdev, dev_info(&pdev->xdev->dev, "Creating PCI Frontend Bus %04x:%02x\n", domain, bus); - bus_entry = kzalloc_obj(*bus_entry, GFP_KERNEL); - sd = kzalloc_obj(*sd, GFP_KERNEL); + bus_entry = kzalloc_obj(*bus_entry); + sd = kzalloc_obj(*sd); if (!bus_entry || !sd) { err = -ENOMEM; goto err_out; @@ -687,7 +687,7 @@ static struct pcifront_device *alloc_pdev(struct xenbus_device *xdev) { struct pcifront_device *pdev; - pdev = kzalloc_obj(struct pcifront_device, GFP_KERNEL); + pdev = kzalloc_obj(struct pcifront_device); if (pdev == NULL) goto out; |
