diff options
Diffstat (limited to 'drivers/acpi')
48 files changed, 80 insertions, 80 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 94049a15f7b9..c5d77c3cb4bc 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -208,7 +208,7 @@ static int acpi_ac_probe(struct platform_device *pdev) struct acpi_ac *ac; int result; - ac = kzalloc_obj(struct acpi_ac, GFP_KERNEL); + ac = kzalloc_obj(struct acpi_ac); if (!ac) return -ENOMEM; diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index d9cd3f97aa00..bed0791c17fc 100644 --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -202,7 +202,7 @@ static int acpi_apd_create_device(struct acpi_device *adev, return IS_ERR_OR_NULL(pdev) ? PTR_ERR(pdev) : 1; } - pdata = kzalloc_obj(*pdata, GFP_KERNEL); + pdata = kzalloc_obj(*pdata); if (!pdata) return -ENOMEM; diff --git a/drivers/acpi/acpi_configfs.c b/drivers/acpi/acpi_configfs.c index c20bedff2c04..12ffec795803 100644 --- a/drivers/acpi/acpi_configfs.c +++ b/drivers/acpi/acpi_configfs.c @@ -210,7 +210,7 @@ static struct config_item *acpi_table_make_item(struct config_group *group, { struct acpi_table *table; - table = kzalloc_obj(*table, GFP_KERNEL); + table = kzalloc_obj(*table); if (!table) return ERR_PTR(-ENOMEM); diff --git a/drivers/acpi/acpi_ipmi.c b/drivers/acpi/acpi_ipmi.c index 5ec5a841afce..8f1aeae8b72e 100644 --- a/drivers/acpi/acpi_ipmi.c +++ b/drivers/acpi/acpi_ipmi.c @@ -117,7 +117,7 @@ ipmi_dev_alloc(int iface, struct device *dev, acpi_handle handle) int err; struct ipmi_user *user; - ipmi_device = kzalloc_obj(*ipmi_device, GFP_KERNEL); + ipmi_device = kzalloc_obj(*ipmi_device); if (!ipmi_device) return NULL; @@ -197,7 +197,7 @@ static struct acpi_ipmi_msg *ipmi_msg_alloc(void) if (!ipmi) return NULL; - ipmi_msg = kzalloc_obj(struct acpi_ipmi_msg, GFP_KERNEL); + ipmi_msg = kzalloc_obj(struct acpi_ipmi_msg); if (!ipmi_msg) { acpi_ipmi_dev_put(ipmi); return NULL; diff --git a/drivers/acpi/acpi_lpat.c b/drivers/acpi/acpi_lpat.c index b238f9f371dd..6141c9070eca 100644 --- a/drivers/acpi/acpi_lpat.c +++ b/drivers/acpi/acpi_lpat.c @@ -104,7 +104,7 @@ struct acpi_lpat_conversion_table *acpi_lpat_get_conversion_table(acpi_handle (obj_p->package.count % 2) || (obj_p->package.count < 4)) goto out; - lpat = kzalloc_objs(int, obj_p->package.count, GFP_KERNEL); + lpat = kzalloc_objs(int, obj_p->package.count); if (!lpat) goto out; @@ -117,7 +117,7 @@ struct acpi_lpat_conversion_table *acpi_lpat_get_conversion_table(acpi_handle lpat[i] = (s64)obj_e->integer.value; } - lpat_table = kzalloc_obj(*lpat_table, GFP_KERNEL); + lpat_table = kzalloc_obj(*lpat_table); if (!lpat_table) { kfree(lpat); goto out; diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index f12a9766696b..02a472fa85fc 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -80,7 +80,7 @@ acpi_memory_get_resource(struct acpi_resource *resource, void *context) } } - new = kzalloc_obj(struct acpi_memory_info, GFP_KERNEL); + new = kzalloc_obj(struct acpi_memory_info); if (!new) return AE_ERROR; @@ -290,7 +290,7 @@ static int acpi_memory_device_add(struct acpi_device *device, if (!device) return -EINVAL; - mem_device = kzalloc_obj(struct acpi_memory_device, GFP_KERNEL); + mem_device = kzalloc_obj(struct acpi_memory_device); if (!mem_device) return -ENOMEM; diff --git a/drivers/acpi/acpi_mrrm.c b/drivers/acpi/acpi_mrrm.c index df771e49333f..e99cbda83452 100644 --- a/drivers/acpi/acpi_mrrm.c +++ b/drivers/acpi/acpi_mrrm.c @@ -161,7 +161,7 @@ static __init int add_boot_memory_ranges(void) if (!pkobj) return -ENOMEM; - kobjs = kzalloc_objs(*kobjs, mrrm_mem_entry_num, GFP_KERNEL); + kobjs = kzalloc_objs(*kobjs, mrrm_mem_entry_num); if (!kobjs) { kobject_put(pkobj); return -ENOMEM; diff --git a/drivers/acpi/acpi_pcc.c b/drivers/acpi/acpi_pcc.c index 6914071d640b..438c67189511 100644 --- a/drivers/acpi/acpi_pcc.c +++ b/drivers/acpi/acpi_pcc.c @@ -54,7 +54,7 @@ acpi_pcc_address_space_setup(acpi_handle region_handle, u32 function, struct pcc_mbox_chan *pcc_chan; acpi_status ret; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return AE_NO_MEMORY; diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c index 3ea6d941aabd..64199b19ceff 100644 --- a/drivers/acpi/acpi_platform.c +++ b/drivers/acpi/acpi_platform.c @@ -145,7 +145,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev, if (count > 0) { struct resource_entry *rentry; - resources = kzalloc_objs(*resources, count, GFP_KERNEL); + resources = kzalloc_objs(*resources, count); if (!resources) { acpi_dev_free_resource_list(&resource_list); return ERR_PTR(-ENOMEM); diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 02a80803962c..b34a48068a8d 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -428,7 +428,7 @@ static int acpi_processor_add(struct acpi_device *device, if (!acpi_device_is_enabled(device)) return -ENODEV; - pr = kzalloc_obj(struct acpi_processor, GFP_KERNEL); + pr = kzalloc_obj(struct acpi_processor); if (!pr) return -ENOMEM; diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c index a2e07d946ce3..5f4751478752 100644 --- a/drivers/acpi/acpi_video.c +++ b/drivers/acpi/acpi_video.c @@ -825,7 +825,7 @@ int acpi_video_get_levels(struct acpi_device *device, goto out; } - br = kzalloc_obj(*br, GFP_KERNEL); + br = kzalloc_obj(*br); if (!br) { result = -ENOMEM; goto out; @@ -1141,7 +1141,7 @@ static int acpi_video_bus_get_one_device(struct acpi_device *device, void *arg) if (acpi_get_local_u64_address(device->handle, &device_id)) goto exit; - data = kzalloc_obj(struct acpi_video_device, GFP_KERNEL); + data = kzalloc_obj(struct acpi_video_device); if (!data) { dev_dbg(&device->dev, "Cannot attach\n"); return -ENOMEM; @@ -2003,7 +2003,7 @@ static int acpi_video_bus_probe(struct platform_device *pdev) return -ENODEV; } - video = kzalloc_obj(struct acpi_video_bus, GFP_KERNEL); + video = kzalloc_obj(struct acpi_video_bus); if (!video) return -ENOMEM; diff --git a/drivers/acpi/acpi_watchdog.c b/drivers/acpi/acpi_watchdog.c index 7e22fc35ed6d..c04f242a6aa2 100644 --- a/drivers/acpi/acpi_watchdog.c +++ b/drivers/acpi/acpi_watchdog.c @@ -166,7 +166,7 @@ void __init acpi_watchdog_init(void) } } - resources = kzalloc_objs(*resources, nresources, GFP_KERNEL); + resources = kzalloc_objs(*resources, nresources); if (!resources) goto fail_free_resource_list; diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c index 95b8483b9e98..7a06d30bd40e 100644 --- a/drivers/acpi/apei/apei-base.c +++ b/drivers/acpi/apei/apei-base.c @@ -316,7 +316,7 @@ repeat: if (res_ins) list_add(&res_ins->list, res_list); else { - res_ins = kmalloc_obj(*res_ins, GFP_KERNEL); + res_ins = kmalloc_obj(*res_ins); if (!res_ins) return -ENOMEM; res_ins->start = start; @@ -345,7 +345,7 @@ static int apei_res_sub(struct list_head *res_list1, break; } else if (res1->end > res2->end && res1->start < res2->start) { - res = kmalloc_obj(*res, GFP_KERNEL); + res = kmalloc_obj(*res); if (!res) return -ENOMEM; res->start = res2->end; diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 442561637f88..8acd2742bb27 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -272,7 +272,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic) unsigned int error_block_length; int rc; - ghes = kzalloc_obj(*ghes, GFP_KERNEL); + ghes = kzalloc_obj(*ghes); if (!ghes) return ERR_PTR(-ENOMEM); diff --git a/drivers/acpi/arm64/ffh.c b/drivers/acpi/arm64/ffh.c index d850af765ba1..04380bab193d 100644 --- a/drivers/acpi/arm64/ffh.c +++ b/drivers/acpi/arm64/ffh.c @@ -33,7 +33,7 @@ int acpi_ffh_address_space_arch_setup(void *handler_ctxt, void **region_ctxt) return -EOPNOTSUPP; } - ffh_ctxt = kzalloc_obj(*ffh_ctxt, GFP_KERNEL); + ffh_ctxt = kzalloc_obj(*ffh_ctxt); if (!ffh_ctxt) return -ENOMEM; diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index 8e74b4eaf9bd..af7a9b2fd5bc 100644 --- a/drivers/acpi/arm64/iort.c +++ b/drivers/acpi/arm64/iort.c @@ -165,7 +165,7 @@ int iort_register_domain_token(int trans_id, phys_addr_t base, { struct iort_its_msi_chip *its_msi_chip; - its_msi_chip = kzalloc_obj(*its_msi_chip, GFP_KERNEL); + its_msi_chip = kzalloc_obj(*its_msi_chip); if (!its_msi_chip) return -ENOMEM; @@ -938,7 +938,7 @@ static struct iommu_iort_rmr_data *iort_rmr_alloc( u32 *sids_copy; u64 addr = rmr_desc->base_address, size = rmr_desc->length; - rmr_data = kmalloc_obj(*rmr_data, GFP_KERNEL); + rmr_data = kmalloc_obj(*rmr_data); if (!rmr_data) return NULL; @@ -1942,7 +1942,7 @@ static int __init iort_add_platform_device(struct acpi_iort_node *node, count = ops->dev_count_resources(node); - r = kzalloc_objs(*r, count, GFP_KERNEL); + r = kzalloc_objs(*r, count); if (!r) { ret = -ENOMEM; goto dev_put; diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index b9929b6ef62d..97b05246efab 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -544,7 +544,7 @@ static int acpi_button_probe(struct platform_device *pdev) lid_init_state == ACPI_BUTTON_LID_INIT_DISABLED) return -ENODEV; - button = kzalloc_obj(struct acpi_button, GFP_KERNEL); + button = kzalloc_obj(struct acpi_button); if (!button) return -ENOMEM; diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index 055ad5f4782d..f138a433554a 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c @@ -52,7 +52,7 @@ static int container_device_attach(struct acpi_device *adev, if (adev->flags.is_dock_station) return 0; - cdev = kzalloc_obj(*cdev, GFP_KERNEL); + cdev = kzalloc_obj(*cdev); if (!cdev) return -ENOMEM; diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index d2e13252fce6..5c2116171789 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -712,7 +712,7 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr) out_obj = (union acpi_object *) output.pointer; - cpc_ptr = kzalloc_obj(struct cpc_desc, GFP_KERNEL); + cpc_ptr = kzalloc_obj(struct cpc_desc); if (!cpc_ptr) { ret = -ENOMEM; goto out_buf_free; diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index e2239d4bb9df..d7f3a8912e6a 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -73,7 +73,7 @@ static int add_dock_dependent_device(struct dock_station *ds, { struct dock_dependent_device *dd; - dd = kzalloc_obj(*dd, GFP_KERNEL); + dd = kzalloc_obj(*dd); if (!dd) return -ENOMEM; diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 8da0971f2238..5f63ed120a2c 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1100,7 +1100,7 @@ int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit, if (!handle && !func) return -EINVAL; - handler = kzalloc_obj(*handler, GFP_KERNEL); + handler = kzalloc_obj(*handler); if (!handler) return -ENOMEM; @@ -1177,7 +1177,7 @@ static struct acpi_ec_query *acpi_ec_create_query(struct acpi_ec *ec, u8 *pval) struct acpi_ec_query *q; struct transaction *t; - q = kzalloc_obj(struct acpi_ec_query, GFP_KERNEL); + q = kzalloc_obj(struct acpi_ec_query); if (!q) return NULL; @@ -1422,7 +1422,7 @@ static void acpi_ec_free(struct acpi_ec *ec) static struct acpi_ec *acpi_ec_alloc(void) { - struct acpi_ec *ec = kzalloc_obj(struct acpi_ec, GFP_KERNEL); + struct acpi_ec *ec = kzalloc_obj(struct acpi_ec); if (!ec) return NULL; diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index e96def7db715..b1776809279d 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -246,7 +246,7 @@ int acpi_bind_one(struct device *dev, struct acpi_device *acpi_dev) acpi_dev_get(acpi_dev); get_device(dev); - physical_node = kzalloc_obj(*physical_node, GFP_KERNEL); + physical_node = kzalloc_obj(*physical_node); if (!physical_node) { retval = -ENOMEM; goto err; diff --git a/drivers/acpi/ioapic.c b/drivers/acpi/ioapic.c index 5a432899875b..533ddd75922b 100644 --- a/drivers/acpi/ioapic.c +++ b/drivers/acpi/ioapic.c @@ -120,7 +120,7 @@ static acpi_status handle_ioapic_add(acpi_handle handle, u32 lvl, goto exit; } - ioapic = kzalloc_obj(*ioapic, GFP_KERNEL); + ioapic = kzalloc_obj(*ioapic); if (!ioapic) { pr_err("cannot allocate memory for new IOAPIC\n"); goto exit; diff --git a/drivers/acpi/mipi-disco-img.c b/drivers/acpi/mipi-disco-img.c index 6351a66c555d..328093ed7136 100644 --- a/drivers/acpi/mipi-disco-img.c +++ b/drivers/acpi/mipi-disco-img.c @@ -111,7 +111,7 @@ static struct crs_csi2 *acpi_mipi_add_crs_csi2(acpi_handle handle, { struct crs_csi2 *csi2; - csi2 = kzalloc_obj(*csi2, GFP_KERNEL); + csi2 = kzalloc_obj(*csi2); if (!csi2) return NULL; diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index b59dcbff25c1..d13264fb9e02 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -2271,9 +2271,9 @@ static int acpi_nfit_init_interleave_set(struct acpi_nfit_desc *acpi_desc, { u16 nr = ndr_desc->num_mappings; struct nfit_set_info2 *info2 __free(kfree) = - kzalloc_objs(*info2, nr, GFP_KERNEL); + kzalloc_objs(*info2, nr); struct nfit_set_info *info __free(kfree) = - kzalloc_objs(*info, nr, GFP_KERNEL); + kzalloc_objs(*info, nr); struct device *dev = acpi_desc->dev; struct nd_interleave_set *nd_set; int i; diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index 3f68ba64537d..9792dc394756 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -202,7 +202,7 @@ static __init void alloc_memory_initiator(unsigned int cpu_pxm) if (initiator) return; - initiator = kzalloc_obj(*initiator, GFP_KERNEL); + initiator = kzalloc_obj(*initiator); if (!initiator) return; @@ -217,7 +217,7 @@ static __init struct memory_target *alloc_target(unsigned int mem_pxm) target = find_mem_target(mem_pxm); if (!target) { - target = kzalloc_obj(*target, GFP_KERNEL); + target = kzalloc_obj(*target); if (!target) return NULL; target->memory_pxm = mem_pxm; @@ -371,7 +371,7 @@ static __init void hmat_add_locality(struct acpi_hmat_locality *hmat_loc) { struct memory_locality *loc; - loc = kzalloc_obj(*loc, GFP_KERNEL); + loc = kzalloc_obj(*loc); if (!loc) { pr_notice_once("Failed to allocate HMAT locality\n"); return; @@ -502,7 +502,7 @@ static __init int hmat_parse_cache(union acpi_subtable_headers *header, if (!target) return 0; - tcache = kzalloc_obj(*tcache, GFP_KERNEL); + tcache = kzalloc_obj(*tcache); if (!tcache) { pr_notice_once("Failed to allocate HMAT cache info\n"); return 0; diff --git a/drivers/acpi/nvs.c b/drivers/acpi/nvs.c index 354783ede8f1..6eaad7dd0241 100644 --- a/drivers/acpi/nvs.c +++ b/drivers/acpi/nvs.c @@ -39,7 +39,7 @@ int acpi_nvs_register(__u64 start, __u64 size) { struct nvs_region *region; - region = kmalloc_obj(*region, GFP_KERNEL); + region = kmalloc_obj(*region); if (!region) return -ENOMEM; region->phys_start = start; @@ -102,7 +102,7 @@ static int suspend_nvs_register(unsigned long start, unsigned long size) while (size > 0) { unsigned int nr_bytes; - entry = kzalloc_obj(struct nvs_page, GFP_KERNEL); + entry = kzalloc_obj(struct nvs_page); if (!entry) goto Error; diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 0fa12dd40840..5b777316b9ac 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -344,7 +344,7 @@ void __iomem __ref goto out; } - map = kzalloc_obj(*map, GFP_KERNEL); + map = kzalloc_obj(*map); if (!map) { mutex_unlock(&acpi_ioremap_lock); return NULL; @@ -1197,7 +1197,7 @@ acpi_status acpi_hotplug_schedule(struct acpi_device *adev, u32 src) "Scheduling hotplug event %u for deferred handling\n", src); - hpw = kmalloc_obj(*hpw, GFP_KERNEL); + hpw = kmalloc_obj(*hpw); if (!hpw) return AE_NO_MEMORY; diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 5a4169db5ea6..8558f0ef64e3 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c @@ -147,7 +147,7 @@ static int acpi_pci_irq_check_entry(acpi_handle handle, struct pci_dev *dev, prt->pin + 1 != pin) return -ENODEV; - entry = kzalloc_obj(struct acpi_prt_entry, GFP_KERNEL); + entry = kzalloc_obj(struct acpi_prt_entry); if (!entry) return -ENOMEM; diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index e3b03237fa57..45bdfd06bd21 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c @@ -720,7 +720,7 @@ static int acpi_pci_link_add(struct acpi_device *device, int result; int i; - link = kzalloc_obj(struct acpi_pci_link, GFP_KERNEL); + link = kzalloc_obj(struct acpi_pci_link); if (!link) return -ENOMEM; diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c index 99a50e9c12dd..0782a5d839bf 100644 --- a/drivers/acpi/pci_mcfg.c +++ b/drivers/acpi/pci_mcfg.c @@ -304,7 +304,7 @@ static __init int pci_mcfg_parse(struct acpi_table_header *header) mcfg = (struct acpi_table_mcfg *)header; mptr = (struct acpi_mcfg_allocation *) &mcfg[1]; - arr = kzalloc_objs(*arr, n, GFP_KERNEL); + arr = kzalloc_objs(*arr, n); if (!arr) return -ENOMEM; diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index bd2525fcda8e..4a882e939525 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -648,7 +648,7 @@ static int acpi_pci_root_add(struct acpi_device *device, bool hotadd = system_state == SYSTEM_RUNNING; const char *acpi_hid; - root = kzalloc_obj(struct acpi_pci_root, GFP_KERNEL); + root = kzalloc_obj(struct acpi_pci_root); if (!root) return -ENOMEM; diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c index 031d00a4a75f..33a123074071 100644 --- a/drivers/acpi/pci_slot.c +++ b/drivers/acpi/pci_slot.c @@ -104,7 +104,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) return AE_OK; } - slot = kmalloc_obj(*slot, GFP_KERNEL); + slot = kmalloc_obj(*slot); if (!slot) return AE_OK; diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index e377446b5cce..4611159ee734 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -104,7 +104,7 @@ static int acpi_power_resources_list_add(acpi_handle handle, if (!resource || !list) return -EINVAL; - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (!entry) return -ENOMEM; @@ -265,7 +265,7 @@ acpi_power_resource_add_dependent(struct acpi_power_resource *resource, goto unlock; } - dep = kzalloc_obj(*dep, GFP_KERNEL); + dep = kzalloc_obj(*dep); if (!dep) { ret = -ENOMEM; goto unlock; @@ -945,7 +945,7 @@ struct acpi_device *acpi_add_power_resource(acpi_handle handle) if (device) return device; - resource = kzalloc_obj(*resource, GFP_KERNEL); + resource = kzalloc_obj(*resource); if (!resource) return NULL; diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c index 5d4b0f7904d6..7f5851371e5f 100644 --- a/drivers/acpi/prmt.c +++ b/drivers/acpi/prmt.c @@ -135,7 +135,7 @@ acpi_parse_prmt(union acpi_subtable_headers *header, const unsigned long end) goto parse_prmt_out4; memmove(tm->mmio_info, temp_mmio, mmio_range_size); } else { - tm->mmio_info = kmalloc_obj(*tm->mmio_info, GFP_KERNEL); + tm->mmio_info = kmalloc_obj(*tm->mmio_info); if (!tm->mmio_info) goto parse_prmt_out2; diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index aa7020d71b55..f6c72e3a2be1 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -910,7 +910,7 @@ static int acpi_processor_evaluate_lpi(acpi_handle handle, goto end; } - lpi_state = kzalloc_objs(*lpi_state, pkg_count, GFP_KERNEL); + lpi_state = kzalloc_objs(*lpi_state, pkg_count); if (!lpi_state) { ret = -ENOMEM; goto end; @@ -1417,7 +1417,7 @@ void acpi_processor_power_init(struct acpi_processor *pr) if (!pr->flags.power) return; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return; diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c index e174d144f1d9..a46bd9876b11 100644 --- a/drivers/acpi/processor_pdc.c +++ b/drivers/acpi/processor_pdc.c @@ -32,11 +32,11 @@ static struct acpi_object_list *acpi_processor_alloc_pdc(void) u32 *buf; /* allocate and initialize pdc. It will be used later. */ - obj_list = kmalloc_obj(struct acpi_object_list, GFP_KERNEL); + obj_list = kmalloc_obj(struct acpi_object_list); if (!obj_list) goto out; - obj = kmalloc_obj(union acpi_object, GFP_KERNEL); + obj = kmalloc_obj(union acpi_object); if (!obj) { kfree(obj_list); goto out; diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c index 710dccae595b..8ee5a1f0eb48 100644 --- a/drivers/acpi/property.c +++ b/drivers/acpi/property.c @@ -89,7 +89,7 @@ static bool acpi_nondev_subnode_extract(union acpi_object *desc, if (acpi_graph_ignore_port(handle)) return false; - dn = kzalloc_obj(*dn, GFP_KERNEL); + dn = kzalloc_obj(*dn); if (!dn) return false; @@ -383,7 +383,7 @@ acpi_data_add_props(struct acpi_device_data *data, const guid_t *guid, { struct acpi_device_properties *props; - props = kzalloc_obj(*props, GFP_KERNEL); + props = kzalloc_obj(*props); if (props) { INIT_LIST_HEAD(&props->list); props->guid = guid; diff --git a/drivers/acpi/riscv/irq.c b/drivers/acpi/riscv/irq.c index f3cef56ff59e..c1f759fb5758 100644 --- a/drivers/acpi/riscv/irq.c +++ b/drivers/acpi/riscv/irq.c @@ -136,7 +136,7 @@ static int __init riscv_acpi_register_ext_intc(u32 gsi_base, u32 nr_irqs, u32 nr { struct riscv_ext_intc_list *ext_intc_element, *node, *prev; - ext_intc_element = kzalloc_obj(*ext_intc_element, GFP_KERNEL); + ext_intc_element = kzalloc_obj(*ext_intc_element); if (!ext_intc_element) return -ENOMEM; diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index bcbd02d665d5..bbd3938f7b52 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c @@ -636,7 +636,7 @@ static int acpi_sbs_probe(struct platform_device *pdev) int result = 0; int id; - sbs = kzalloc_obj(struct acpi_sbs, GFP_KERNEL); + sbs = kzalloc_obj(struct acpi_sbs); if (!sbs) { result = -ENOMEM; goto end; diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c index 969c1da7a015..36850831910b 100644 --- a/drivers/acpi/sbshc.c +++ b/drivers/acpi/sbshc.c @@ -254,7 +254,7 @@ static int acpi_smbus_hc_probe(struct platform_device *pdev) strscpy(acpi_device_name(device), ACPI_SMB_HC_DEVICE_NAME); strscpy(acpi_device_class(device), ACPI_SMB_HC_CLASS); - hc = kzalloc_obj(struct acpi_smb_hc, GFP_KERNEL); + hc = kzalloc_obj(struct acpi_smb_hc); if (!hc) return -ENOMEM; mutex_init(&hc->lock); diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 490242bf161b..a6f453d4785b 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1330,7 +1330,7 @@ static void acpi_add_id(struct acpi_device_pnp *pnp, const char *dev_id) { struct acpi_hardware_id *id; - id = kmalloc_obj(*id, GFP_KERNEL); + id = kmalloc_obj(*id); if (!id) return; @@ -1568,7 +1568,7 @@ int acpi_dma_get_range(struct device *dev, const struct bus_dma_region **map) ret = acpi_dev_get_dma_resources(adev, &list); if (ret > 0) { - r = kzalloc_objs(*r, ret + 1, GFP_KERNEL); + r = kzalloc_objs(*r, ret + 1); if (!r) { ret = -ENOMEM; goto out; @@ -1863,7 +1863,7 @@ static int acpi_add_single_object(struct acpi_device **child, bool release_dep_lock = false; int result; - device = kzalloc_obj(struct acpi_device, GFP_KERNEL); + device = kzalloc_obj(struct acpi_device); if (!device) return -ENOMEM; @@ -2028,7 +2028,7 @@ int acpi_scan_add_dep(acpi_handle handle, struct acpi_handle_list *dep_devices) if (skip) continue; - dep = kzalloc_obj(*dep, GFP_KERNEL); + dep = kzalloc_obj(*dep); if (!dep) continue; @@ -2225,7 +2225,7 @@ static void acpi_default_enumeration(struct acpi_device *device) * other device objects have been processed and PCI has claimed * BARs in case there are resource conflicts. */ - sd = kmalloc_obj(*sd, GFP_KERNEL); + sd = kmalloc_obj(*sd); if (sd) { sd->adev = device; list_add_tail(&sd->node, &acpi_scan_system_dev_list); @@ -2899,7 +2899,7 @@ void acpi_scan_table_notify(void) if (!acpi_scan_initialized) return; - work = kmalloc_obj(*work, GFP_KERNEL); + work = kmalloc_obj(*work); if (!work) return; diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 44ea37f998e6..a625de3c3c8b 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c @@ -385,7 +385,7 @@ acpi_status acpi_sysfs_table_handler(u32 event, void *table, void *context) switch (event) { case ACPI_TABLE_EVENT_INSTALL: - table_attr = kzalloc_obj(*table_attr, GFP_KERNEL); + table_attr = kzalloc_obj(*table_attr); if (!table_attr) return AE_NO_MEMORY; @@ -491,7 +491,7 @@ static int acpi_table_data_init(struct acpi_table_header *th) for (i = 0; i < NUM_ACPI_DATA_OBJS; i++) { if (ACPI_COMPARE_NAMESEG(th->signature, acpi_data_objs[i].name)) { - data_attr = kzalloc_obj(*data_attr, GFP_KERNEL); + data_attr = kzalloc_obj(*data_attr); if (!data_attr) return -ENOMEM; sysfs_attr_init(&data_attr->attr.attr); @@ -532,7 +532,7 @@ static int acpi_tables_sysfs_init(void) if (ACPI_FAILURE(status)) continue; - table_attr = kzalloc_obj(*table_attr, GFP_KERNEL); + table_attr = kzalloc_obj(*table_attr); if (!table_attr) return -ENOMEM; @@ -864,11 +864,11 @@ void acpi_irq_stats_init(void) num_gpes = acpi_current_gpe_count; num_counters = num_gpes + ACPI_NUM_FIXED_EVENTS + NUM_COUNTERS_EXTRA; - all_attrs = kzalloc_objs(*all_attrs, num_counters + 1, GFP_KERNEL); + all_attrs = kzalloc_objs(*all_attrs, num_counters + 1); if (all_attrs == NULL) return; - all_counters = kzalloc_objs(*all_counters, num_counters, GFP_KERNEL); + all_counters = kzalloc_objs(*all_counters, num_counters); if (all_counters == NULL) goto fail; @@ -876,7 +876,7 @@ void acpi_irq_stats_init(void) if (ACPI_FAILURE(status)) goto fail; - counter_attrs = kzalloc_objs(*counter_attrs, num_counters, GFP_KERNEL); + counter_attrs = kzalloc_objs(*counter_attrs, num_counters); if (counter_attrs == NULL) goto fail; diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index b2a1e1773840..64356b004a57 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -792,7 +792,7 @@ static int acpi_thermal_probe(struct platform_device *pdev) if (!device) return -EINVAL; - tz = kzalloc_obj(struct acpi_thermal, GFP_KERNEL); + tz = kzalloc_obj(struct acpi_thermal); if (!tz) return -ENOMEM; diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index 67b9a17e33ec..6ab27e4826d1 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -365,7 +365,7 @@ bool acpi_evaluate_reference(acpi_handle handle, acpi_string pathname, goto err; list->count = package->package.count; - list->handles = kzalloc_objs(*list->handles, list->count, GFP_KERNEL); + list->handles = kzalloc_objs(*list->handles, list->count); if (!list->handles) goto err_clear; diff --git a/drivers/acpi/viot.c b/drivers/acpi/viot.c index 26fe65dd4a6c..c05fcc060e63 100644 --- a/drivers/acpi/viot.c +++ b/drivers/acpi/viot.c @@ -142,7 +142,7 @@ static struct viot_iommu * __init viot_get_iommu(unsigned int offset) if (viot_check_bounds(hdr)) return NULL; - viommu = kzalloc_obj(*viommu, GFP_KERNEL); + viommu = kzalloc_obj(*viommu); if (!viommu) return NULL; @@ -193,7 +193,7 @@ static int __init viot_parse_node(const struct acpi_viot_header *hdr) hdr->type == ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO) return 0; - ep = kzalloc_obj(*ep, GFP_KERNEL); + ep = kzalloc_obj(*ep); if (!ep) return -ENOMEM; diff --git a/drivers/acpi/wakeup.c b/drivers/acpi/wakeup.c index f82e6f3127b6..0cbee0f06f0d 100644 --- a/drivers/acpi/wakeup.c +++ b/drivers/acpi/wakeup.c @@ -120,7 +120,7 @@ int acpi_register_wakeup_handler(int wake_irq, bool (*wakeup)(void *context), if (!acpi_sci_irq_valid() || wake_irq != acpi_sci_irq) return 0; - handler = kmalloc_obj(*handler, GFP_KERNEL); + handler = kmalloc_obj(*handler); if (!handler) return -ENOMEM; diff --git a/drivers/acpi/x86/lpss.c b/drivers/acpi/x86/lpss.c index 3dfb8c2400f5..0171eef00484 100644 --- a/drivers/acpi/x86/lpss.c +++ b/drivers/acpi/x86/lpss.c @@ -623,7 +623,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev, if (!dev_desc) return -EINVAL; - pdata = kzalloc_obj(*pdata, GFP_KERNEL); + pdata = kzalloc_obj(*pdata); if (!pdata) return -ENOMEM; |
