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/hid | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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/hid')
62 files changed, 89 insertions, 89 deletions
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_client.c b/drivers/hid/amd-sfh-hid/amd_sfh_client.c index 8b479441bf90..96ae792beeb6 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_client.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_client.c @@ -47,7 +47,7 @@ int amd_sfh_get_report(struct hid_device *hid, int report_id, int report_type) guard(mutex)(&mp2->lock); for (i = 0; i < cli_data->num_hid_devices; i++) { if (cli_data->hid_sensor_hubs[i] == hid) { - struct request_list *new = kzalloc_obj(*new, GFP_KERNEL); + struct request_list *new = kzalloc_obj(*new); if (!new) return -ENOMEM; diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c index 59bc9a2e0cd7..b04f675d49b0 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c @@ -135,7 +135,7 @@ int amdtp_hid_probe(u32 cur_hid_dev, struct amdtp_cl_data *cli_data) if (IS_ERR(hid)) return PTR_ERR(hid); - hid_data = kzalloc_obj(*hid_data, GFP_KERNEL); + hid_data = kzalloc_obj(*hid_data); if (!hid_data) { rc = -ENOMEM; goto err_hid_data; diff --git a/drivers/hid/bpf/hid_bpf_dispatch.c b/drivers/hid/bpf/hid_bpf_dispatch.c index c99d81789eb3..f3d15994ca1e 100644 --- a/drivers/hid/bpf/hid_bpf_dispatch.c +++ b/drivers/hid/bpf/hid_bpf_dispatch.c @@ -320,7 +320,7 @@ hid_bpf_allocate_context(unsigned int hid_id) if (IS_ERR(hdev)) return NULL; - ctx_kern = kzalloc_obj(*ctx_kern, GFP_KERNEL); + ctx_kern = kzalloc_obj(*ctx_kern); if (!ctx_kern) { hid_put_device(hdev); return NULL; diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index 189baafe2d1e..b949b767cf08 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c @@ -794,7 +794,7 @@ static int apple_backlight_set(struct hid_device *hdev, u16 value, u16 rate) int ret = 0; struct apple_backlight_set_report *rep; - rep = kmalloc_obj(*rep, GFP_KERNEL); + rep = kmalloc_obj(*rep); if (rep == NULL) return -ENOMEM; diff --git a/drivers/hid/hid-axff.c b/drivers/hid/hid-axff.c index c7dcdffff9e6..3c5c2bf02425 100644 --- a/drivers/hid/hid-axff.c +++ b/drivers/hid/hid-axff.c @@ -96,7 +96,7 @@ static int axff_init(struct hid_device *hid) return -ENODEV; } - axff = kzalloc_obj(struct axff_device, GFP_KERNEL); + axff = kzalloc_obj(struct axff_device); if (!axff) return -ENOMEM; diff --git a/drivers/hid/hid-betopff.c b/drivers/hid/hid-betopff.c index d739b3746138..8a7fe895926c 100644 --- a/drivers/hid/hid-betopff.c +++ b/drivers/hid/hid-betopff.c @@ -100,7 +100,7 @@ static int betopff_init(struct hid_device *hid) } } - betopff = kzalloc_obj(*betopff, GFP_KERNEL); + betopff = kzalloc_obj(*betopff); if (!betopff) return -ENOMEM; diff --git a/drivers/hid/hid-cmedia.c b/drivers/hid/hid-cmedia.c index c81c34e5b41a..6bc50df9b3e1 100644 --- a/drivers/hid/hid-cmedia.c +++ b/drivers/hid/hid-cmedia.c @@ -145,7 +145,7 @@ static int cmhid_probe(struct hid_device *hid, const struct hid_device_id *id) int ret; struct cmhid *cm; - cm = kzalloc_obj(struct cmhid, GFP_KERNEL); + cm = kzalloc_obj(struct cmhid); if (!cm) { ret = -ENOMEM; goto allocfail; diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index d1ea455ce3d2..ef307c4c575e 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -93,7 +93,7 @@ struct hid_report *hid_register_report(struct hid_device *device, if (report_enum->report_id_hash[id]) return report_enum->report_id_hash[id]; - report = kzalloc_obj(struct hid_report, GFP_KERNEL); + report = kzalloc_obj(struct hid_report); if (!report) return NULL; @@ -1797,7 +1797,7 @@ static void hid_report_process_ordering(struct hid_device *hid, } /* allocate the memory to process the fields */ - entries = kzalloc_objs(*entries, count, GFP_KERNEL); + entries = kzalloc_objs(*entries, count); if (!entries) return; @@ -2611,7 +2611,7 @@ static ssize_t new_id_store(struct device_driver *drv, const char *buf, if (ret < 3) return -EINVAL; - dynid = kzalloc_obj(*dynid, GFP_KERNEL); + dynid = kzalloc_obj(*dynid); if (!dynid) return -ENOMEM; @@ -2973,7 +2973,7 @@ struct hid_device *hid_allocate_device(void) struct hid_device *hdev; int ret = -ENOMEM; - hdev = kzalloc_obj(*hdev, GFP_KERNEL); + hdev = kzalloc_obj(*hdev); if (hdev == NULL) return ERR_PTR(ret); diff --git a/drivers/hid/hid-corsair.c b/drivers/hid/hid-corsair.c index 750cac0a2a69..21cd8b12a757 100644 --- a/drivers/hid/hid-corsair.c +++ b/drivers/hid/hid-corsair.c @@ -427,7 +427,7 @@ static int k90_init_backlight(struct hid_device *dev) size_t name_sz; char *name; - drvdata->backlight = kzalloc_obj(struct k90_led, GFP_KERNEL); + drvdata->backlight = kzalloc_obj(struct k90_led); if (!drvdata->backlight) { ret = -ENOMEM; goto fail_backlight_alloc; @@ -471,7 +471,7 @@ static int k90_init_macro_functions(struct hid_device *dev) size_t name_sz; char *name; - k90 = kzalloc_obj(struct k90_drvdata, GFP_KERNEL); + k90 = kzalloc_obj(struct k90_drvdata); if (!k90) { ret = -ENOMEM; goto fail_drvdata; diff --git a/drivers/hid/hid-cougar.c b/drivers/hid/hid-cougar.c index 0b66a7c61ac6..ad027c45f162 100644 --- a/drivers/hid/hid-cougar.c +++ b/drivers/hid/hid-cougar.c @@ -166,7 +166,7 @@ static int cougar_bind_shared_data(struct hid_device *hdev, shared = cougar_get_shared_data(hdev); if (!shared) { - shared = kzalloc_obj(*shared, GFP_KERNEL); + shared = kzalloc_obj(*shared); if (!shared) { error = -ENOMEM; goto out; diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index 220b497c573a..f20dc46fd8eb 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c @@ -3681,7 +3681,7 @@ static int hid_debug_events_open(struct inode *inode, struct file *file) struct hid_debug_list *list; unsigned long flags; - if (!(list = kzalloc_obj(struct hid_debug_list, GFP_KERNEL))) { + if (!(list = kzalloc_obj(struct hid_debug_list))) { err = -ENOMEM; goto out; } diff --git a/drivers/hid/hid-dr.c b/drivers/hid/hid-dr.c index 9923b222383a..8a8f68a7feb0 100644 --- a/drivers/hid/hid-dr.c +++ b/drivers/hid/hid-dr.c @@ -104,7 +104,7 @@ static int drff_init(struct hid_device *hid) return -ENODEV; } - drff = kzalloc_obj(struct drff_device, GFP_KERNEL); + drff = kzalloc_obj(struct drff_device); if (!drff) return -ENOMEM; diff --git a/drivers/hid/hid-elo.c b/drivers/hid/hid-elo.c index 465f04ed1a55..b8f5f3eb53a4 100644 --- a/drivers/hid/hid-elo.c +++ b/drivers/hid/hid-elo.c @@ -232,7 +232,7 @@ static int elo_probe(struct hid_device *hdev, const struct hid_device_id *id) if (!hid_is_usb(hdev)) return -EINVAL; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; diff --git a/drivers/hid/hid-emsff.c b/drivers/hid/hid-emsff.c index 0dbe598f2e48..1b4ad18f6051 100644 --- a/drivers/hid/hid-emsff.c +++ b/drivers/hid/hid-emsff.c @@ -76,7 +76,7 @@ static int emsff_init(struct hid_device *hid) return -ENODEV; } - emsff = kzalloc_obj(struct emsff_device, GFP_KERNEL); + emsff = kzalloc_obj(struct emsff_device); if (!emsff) return -ENOMEM; diff --git a/drivers/hid/hid-gaff.c b/drivers/hid/hid-gaff.c index a9d305a193d2..8b99686b63df 100644 --- a/drivers/hid/hid-gaff.c +++ b/drivers/hid/hid-gaff.c @@ -96,7 +96,7 @@ static int gaff_init(struct hid_device *hid) return -ENODEV; } - gaff = kzalloc_obj(struct gaff_device, GFP_KERNEL); + gaff = kzalloc_obj(struct gaff_device); if (!gaff) return -ENOMEM; diff --git a/drivers/hid/hid-holtekff.c b/drivers/hid/hid-holtekff.c index 56980af08683..32d08f7a660d 100644 --- a/drivers/hid/hid-holtekff.c +++ b/drivers/hid/hid-holtekff.c @@ -149,7 +149,7 @@ static int holtekff_init(struct hid_device *hid) return -ENODEV; } - holtekff = kzalloc_obj(*holtekff, GFP_KERNEL); + holtekff = kzalloc_obj(*holtekff); if (!holtekff) return -ENOMEM; diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c index f092547d08d2..7d2b0063df15 100644 --- a/drivers/hid/hid-hyperv.c +++ b/drivers/hid/hid-hyperv.c @@ -149,7 +149,7 @@ static struct mousevsc_dev *mousevsc_alloc_device(struct hv_device *device) { struct mousevsc_dev *input_dev; - input_dev = kzalloc_obj(struct mousevsc_dev, GFP_KERNEL); + input_dev = kzalloc_obj(struct mousevsc_dev); if (!input_dev) return NULL; diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 6137cc0aeeaf..d5308adb2894 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -531,7 +531,7 @@ static int hidinput_setup_battery(struct hid_device *dev, unsigned report_type, if (quirks & HID_BATTERY_QUIRK_IGNORE) return 0; - psy_desc = kzalloc_obj(*psy_desc, GFP_KERNEL); + psy_desc = kzalloc_obj(*psy_desc); if (!psy_desc) return -ENOMEM; @@ -2023,7 +2023,7 @@ static void report_features(struct hid_device *hid) static struct hid_input *hidinput_allocate(struct hid_device *hid, unsigned int application) { - struct hid_input *hidinput = kzalloc_obj(*hidinput, GFP_KERNEL); + struct hid_input *hidinput = kzalloc_obj(*hidinput); struct input_dev *input_dev = input_allocate_device(); const char *suffix = NULL; size_t suffix_len, name_len; diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c index 7cdf1e895b69..197c2f3b077f 100644 --- a/drivers/hid/hid-lg.c +++ b/drivers/hid/hid-lg.c @@ -768,7 +768,7 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id) return -ENODEV; } - drv_data = kzalloc_obj(struct lg_drv_data, GFP_KERNEL); + drv_data = kzalloc_obj(struct lg_drv_data); if (!drv_data) { hid_err(hdev, "Insufficient memory, cannot allocate driver data\n"); return -ENOMEM; diff --git a/drivers/hid/hid-lg2ff.c b/drivers/hid/hid-lg2ff.c index e4a034bd4095..c3e85b079d80 100644 --- a/drivers/hid/hid-lg2ff.c +++ b/drivers/hid/hid-lg2ff.c @@ -66,7 +66,7 @@ int lg2ff_init(struct hid_device *hid) if (!report) return -ENODEV; - lg2ff = kmalloc_obj(struct lg2ff_device, GFP_KERNEL); + lg2ff = kmalloc_obj(struct lg2ff_device); if (!lg2ff) return -ENOMEM; diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c index 4979f7779de8..e901fdb7d033 100644 --- a/drivers/hid/hid-lg4ff.c +++ b/drivers/hid/hid-lg4ff.c @@ -1288,7 +1288,7 @@ int lg4ff_init(struct hid_device *hid) hid_err(hid, "Cannot add device, private driver data not allocated\n"); return -1; } - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (!entry) return -ENOMEM; spin_lock_init(&entry->report_lock); diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index 2fb6a67bede2..d9b6c72fc254 100644 --- a/drivers/hid/hid-logitech-dj.c +++ b/drivers/hid/hid-logitech-dj.c @@ -733,7 +733,7 @@ static struct dj_receiver_dev *dj_get_receiver_dev(struct hid_device *hdev, djrcv_dev = dj_find_receiver_dev(hdev, type); if (!djrcv_dev) { - djrcv_dev = kzalloc_obj(*djrcv_dev, GFP_KERNEL); + djrcv_dev = kzalloc_obj(*djrcv_dev); if (!djrcv_dev) goto out; @@ -851,7 +851,7 @@ static void logi_dj_recv_add_djhid_device(struct dj_receiver_dev *djrcv_dev, snprintf(tmpstr, sizeof(tmpstr), ":%d", device_index); strlcat(dj_hiddev->phys, tmpstr, sizeof(dj_hiddev->phys)); - dj_dev = kzalloc_obj(struct dj_device, GFP_KERNEL); + dj_dev = kzalloc_obj(struct dj_device); if (!dj_dev) { hid_err(djrcv_hdev, "%s: failed allocating dj_dev\n", __func__); @@ -1332,7 +1332,7 @@ static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev) goto out; } - dj_report = kzalloc_obj(struct dj_report, GFP_KERNEL); + dj_report = kzalloc_obj(struct dj_report); if (!dj_report) return -ENOMEM; dj_report->report_id = REPORT_ID_DJ_SHORT; @@ -1356,7 +1356,7 @@ static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev, u8 *buf; int retval = 0; - dj_report = kzalloc_obj(struct dj_report, GFP_KERNEL); + dj_report = kzalloc_obj(struct dj_report); if (!dj_report) return -ENOMEM; diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index 4f3289b8a7c2..d40932809ce1 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -390,7 +390,7 @@ static int hidpp_send_fap_command_sync(struct hidpp_device *hidpp, return -EINVAL; } - message = kzalloc_obj(struct hidpp_report, GFP_KERNEL); + message = kzalloc_obj(struct hidpp_report); if (!message) return -ENOMEM; @@ -443,7 +443,7 @@ static int hidpp_send_rap_command_sync(struct hidpp_device *hidpp_dev, if (param_count > max_count) return -EINVAL; - message = kzalloc_obj(struct hidpp_report, GFP_KERNEL); + message = kzalloc_obj(struct hidpp_report); if (!message) return -ENOMEM; message->report_id = report_id; @@ -2527,7 +2527,7 @@ out: static int hidpp_ff_queue_work(struct hidpp_ff_private_data *data, int effect_id, u8 command, u8 *params, u8 size) { - struct hidpp_ff_work_data *wd = kzalloc_obj(*wd, GFP_KERNEL); + struct hidpp_ff_work_data *wd = kzalloc_obj(*wd); int s; if (!wd) @@ -2853,7 +2853,7 @@ static int hidpp_ff_init(struct hidpp_device *hidpp, data = kmemdup(data, sizeof(*data), GFP_KERNEL); if (!data) return -ENOMEM; - data->effect_ids = kzalloc_objs(int, num_slots, GFP_KERNEL); + data->effect_ids = kzalloc_objs(int, num_slots); if (!data->effect_ids) { kfree(data); return -ENOMEM; diff --git a/drivers/hid/hid-megaworld.c b/drivers/hid/hid-megaworld.c index 62f3e976f6b3..81acdbc3a00f 100644 --- a/drivers/hid/hid-megaworld.c +++ b/drivers/hid/hid-megaworld.c @@ -57,7 +57,7 @@ static int mwctrl_init(struct hid_device *hid) return -ENODEV; } - mwctrl = kzalloc_obj(struct mwctrl_device, GFP_KERNEL); + mwctrl = kzalloc_obj(struct mwctrl_device); if (!mwctrl) return -ENOMEM; diff --git a/drivers/hid/hid-mf.c b/drivers/hid/hid-mf.c index 9a34645e92b6..6ff54a1ec697 100644 --- a/drivers/hid/hid-mf.c +++ b/drivers/hid/hid-mf.c @@ -88,7 +88,7 @@ static int mf_init(struct hid_device *hid) input_ptr = input_ptr->next; input = list_entry(input_ptr, struct hid_input, list); - mf = kzalloc_obj(struct mf_device, GFP_KERNEL); + mf = kzalloc_obj(struct mf_device); if (!mf) return -ENOMEM; diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index f48dc2f34f79..2b31756b549e 100644 --- a/drivers/hid/hid-ntrig.c +++ b/drivers/hid/hid-ntrig.c @@ -900,7 +900,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id) hdev->quirks |= HID_QUIRK_MULTI_INPUT | HID_QUIRK_NO_INIT_REPORTS; - nd = kmalloc_obj(struct ntrig_data, GFP_KERNEL); + nd = kmalloc_obj(struct ntrig_data); if (!nd) { hid_err(hdev, "cannot allocate N-Trig data\n"); return -ENOMEM; diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c index 99cae54dc769..2cc01e1bc1a8 100644 --- a/drivers/hid/hid-picolcd_core.c +++ b/drivers/hid/hid-picolcd_core.c @@ -78,7 +78,7 @@ struct picolcd_pending *picolcd_send_and_wait(struct hid_device *hdev, return NULL; if (data->status & PICOLCD_FAILED) return NULL; - work = kzalloc_obj(*work, GFP_KERNEL); + work = kzalloc_obj(*work); if (!work) return NULL; @@ -528,7 +528,7 @@ static int picolcd_probe(struct hid_device *hdev, * Let's allocate the picolcd data structure, set some reasonable * defaults, and associate it with the device */ - data = kzalloc_obj(struct picolcd_data, GFP_KERNEL); + data = kzalloc_obj(struct picolcd_data); if (data == NULL) { hid_err(hdev, "can't allocate space for Minibox PicoLCD device data\n"); return -ENOMEM; diff --git a/drivers/hid/hid-pl.c b/drivers/hid/hid-pl.c index 967f93d9b46b..c6c2961dd574 100644 --- a/drivers/hid/hid-pl.c +++ b/drivers/hid/hid-pl.c @@ -140,7 +140,7 @@ static int plff_init(struct hid_device *hid) return -ENODEV; } - plff = kzalloc_obj(struct plff_device, GFP_KERNEL); + plff = kzalloc_obj(struct plff_device); if (!plff) return -ENOMEM; diff --git a/drivers/hid/hid-playstation.c b/drivers/hid/hid-playstation.c index 2458c6b61358..3c0db8f93c82 100644 --- a/drivers/hid/hid-playstation.c +++ b/drivers/hid/hid-playstation.c @@ -1658,7 +1658,7 @@ static int dualsense_reset_leds(struct dualsense *ds) struct dualsense_output_report report; struct dualsense_output_report_bt *buf; - buf = kzalloc_obj(*buf, GFP_KERNEL); + buf = kzalloc_obj(*buf); if (!buf) return -ENOMEM; diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c index e69b3cb682bc..fba01e4fcab1 100644 --- a/drivers/hid/hid-prodikeys.c +++ b/drivers/hid/hid-prodikeys.c @@ -797,7 +797,7 @@ static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id) intf = to_usb_interface(hdev->dev.parent); ifnum = intf->cur_altsetting->desc.bInterfaceNumber; - pm = kzalloc_obj(*pm, GFP_KERNEL); + pm = kzalloc_obj(*pm); if (pm == NULL) { hid_err(hdev, "can't alloc descriptor\n"); return -ENOMEM; diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c index b6a9cfb71ec9..edc4339adb50 100644 --- a/drivers/hid/hid-quirks.c +++ b/drivers/hid/hid-quirks.c @@ -1164,11 +1164,11 @@ static int hid_modify_dquirk(const struct hid_device_id *id, int list_edited = 0; int ret = 0; - hdev = kzalloc_obj(*hdev, GFP_KERNEL); + hdev = kzalloc_obj(*hdev); if (!hdev) return -ENOMEM; - q_new = kmalloc_obj(struct quirks_list_struct, GFP_KERNEL); + q_new = kmalloc_obj(struct quirks_list_struct); if (!q_new) { ret = -ENOMEM; goto out; diff --git a/drivers/hid/hid-roccat-arvo.c b/drivers/hid/hid-roccat-arvo.c index f7318bc9e1a5..0cf2f0008c7f 100644 --- a/drivers/hid/hid-roccat-arvo.c +++ b/drivers/hid/hid-roccat-arvo.c @@ -299,7 +299,7 @@ static int arvo_init_specials(struct hid_device *hdev) return 0; } - arvo = kzalloc_obj(*arvo, GFP_KERNEL); + arvo = kzalloc_obj(*arvo); if (!arvo) { hid_err(hdev, "can't alloc device descriptor\n"); return -ENOMEM; diff --git a/drivers/hid/hid-roccat-isku.c b/drivers/hid/hid-roccat-isku.c index 470c5e47d185..93a49c93ae8c 100644 --- a/drivers/hid/hid-roccat-isku.c +++ b/drivers/hid/hid-roccat-isku.c @@ -279,7 +279,7 @@ static int isku_init_specials(struct hid_device *hdev) return 0; } - isku = kzalloc_obj(*isku, GFP_KERNEL); + isku = kzalloc_obj(*isku); if (!isku) { hid_err(hdev, "can't alloc device descriptor\n"); return -ENOMEM; diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c index 9ec3e015acb9..58654cf78f0d 100644 --- a/drivers/hid/hid-roccat-kone.c +++ b/drivers/hid/hid-roccat-kone.c @@ -704,7 +704,7 @@ static int kone_init_specials(struct hid_device *hdev) if (intf->cur_altsetting->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE) { - kone = kzalloc_obj(*kone, GFP_KERNEL); + kone = kzalloc_obj(*kone); if (!kone) return -ENOMEM; hid_set_drvdata(hdev, kone); diff --git a/drivers/hid/hid-roccat-koneplus.c b/drivers/hid/hid-roccat-koneplus.c index 534d67a2617e..f80a60539a96 100644 --- a/drivers/hid/hid-roccat-koneplus.c +++ b/drivers/hid/hid-roccat-koneplus.c @@ -384,7 +384,7 @@ static int koneplus_init_specials(struct hid_device *hdev) if (intf->cur_altsetting->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE) { - koneplus = kzalloc_obj(*koneplus, GFP_KERNEL); + koneplus = kzalloc_obj(*koneplus); if (!koneplus) { hid_err(hdev, "can't alloc device descriptor\n"); return -ENOMEM; diff --git a/drivers/hid/hid-roccat-konepure.c b/drivers/hid/hid-roccat-konepure.c index 1994efc4f26b..7f753dfc2a10 100644 --- a/drivers/hid/hid-roccat-konepure.c +++ b/drivers/hid/hid-roccat-konepure.c @@ -88,7 +88,7 @@ static int konepure_init_specials(struct hid_device *hdev) return 0; } - konepure = kzalloc_obj(*konepure, GFP_KERNEL); + konepure = kzalloc_obj(*konepure); if (!konepure) { hid_err(hdev, "can't alloc device descriptor\n"); return -ENOMEM; diff --git a/drivers/hid/hid-roccat-kovaplus.c b/drivers/hid/hid-roccat-kovaplus.c index 429d9b86b672..9ec42c218ef9 100644 --- a/drivers/hid/hid-roccat-kovaplus.c +++ b/drivers/hid/hid-roccat-kovaplus.c @@ -453,7 +453,7 @@ static int kovaplus_init_specials(struct hid_device *hdev) if (intf->cur_altsetting->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE) { - kovaplus = kzalloc_obj(*kovaplus, GFP_KERNEL); + kovaplus = kzalloc_obj(*kovaplus); if (!kovaplus) { hid_err(hdev, "can't alloc device descriptor\n"); return -ENOMEM; diff --git a/drivers/hid/hid-roccat-lua.c b/drivers/hid/hid-roccat-lua.c index a7ed873f8761..8e35e1a0660b 100644 --- a/drivers/hid/hid-roccat-lua.c +++ b/drivers/hid/hid-roccat-lua.c @@ -119,7 +119,7 @@ static int lua_init_specials(struct hid_device *hdev) struct lua_device *lua; int retval; - lua = kzalloc_obj(*lua, GFP_KERNEL); + lua = kzalloc_obj(*lua); if (!lua) { hid_err(hdev, "can't alloc device descriptor\n"); return -ENOMEM; diff --git a/drivers/hid/hid-roccat-pyra.c b/drivers/hid/hid-roccat-pyra.c index 35fffc55eb4f..0d515995bb9d 100644 --- a/drivers/hid/hid-roccat-pyra.c +++ b/drivers/hid/hid-roccat-pyra.c @@ -403,7 +403,7 @@ static int pyra_init_specials(struct hid_device *hdev) if (intf->cur_altsetting->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE) { - pyra = kzalloc_obj(*pyra, GFP_KERNEL); + pyra = kzalloc_obj(*pyra); if (!pyra) { hid_err(hdev, "can't alloc device descriptor\n"); return -ENOMEM; diff --git a/drivers/hid/hid-roccat-ryos.c b/drivers/hid/hid-roccat-ryos.c index 0f4b52ef5404..db83f42457da 100644 --- a/drivers/hid/hid-roccat-ryos.c +++ b/drivers/hid/hid-roccat-ryos.c @@ -96,7 +96,7 @@ static int ryos_init_specials(struct hid_device *hdev) return 0; } - ryos = kzalloc_obj(*ryos, GFP_KERNEL); + ryos = kzalloc_obj(*ryos); if (!ryos) { hid_err(hdev, "can't alloc device descriptor\n"); return -ENOMEM; diff --git a/drivers/hid/hid-roccat-savu.c b/drivers/hid/hid-roccat-savu.c index 90f9b0feb754..679136933560 100644 --- a/drivers/hid/hid-roccat-savu.c +++ b/drivers/hid/hid-roccat-savu.c @@ -68,7 +68,7 @@ static int savu_init_specials(struct hid_device *hdev) return 0; } - savu = kzalloc_obj(*savu, GFP_KERNEL); + savu = kzalloc_obj(*savu); if (!savu) { hid_err(hdev, "can't alloc device descriptor\n"); return -ENOMEM; diff --git a/drivers/hid/hid-roccat.c b/drivers/hid/hid-roccat.c index 5fe16ec1849a..fd0ea52f7cba 100644 --- a/drivers/hid/hid-roccat.c +++ b/drivers/hid/hid-roccat.c @@ -152,7 +152,7 @@ static int roccat_open(struct inode *inode, struct file *file) struct roccat_device *device; int error = 0; - reader = kzalloc_obj(struct roccat_reader, GFP_KERNEL); + reader = kzalloc_obj(struct roccat_reader); if (!reader) return -ENOMEM; @@ -301,7 +301,7 @@ int roccat_connect(const struct class *klass, struct hid_device *hid, int report struct roccat_device *device; int temp; - device = kzalloc_obj(struct roccat_device, GFP_KERNEL); + device = kzalloc_obj(struct roccat_device); if (!device) return -ENOMEM; diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c index 75d827c85e14..afffea894021 100644 --- a/drivers/hid/hid-sensor-custom.c +++ b/drivers/hid/hid-sensor-custom.c @@ -912,7 +912,7 @@ hid_sensor_custom_get_known(struct hid_sensor_hub_device *hsdev, hid_sensor_custom_known_table; struct hid_sensor_custom_properties *prop; - prop = kmalloc_obj(struct hid_sensor_custom_properties, GFP_KERNEL); + prop = kmalloc_obj(struct hid_sensor_custom_properties); if (!prop) return -ENOMEM; diff --git a/drivers/hid/hid-sjoy.c b/drivers/hid/hid-sjoy.c index e567c264aed3..bab93d71b760 100644 --- a/drivers/hid/hid-sjoy.c +++ b/drivers/hid/hid-sjoy.c @@ -83,7 +83,7 @@ static int sjoyff_init(struct hid_device *hid) return -ENODEV; } - sjoyff = kzalloc_obj(struct sjoyff_device, GFP_KERNEL); + sjoyff = kzalloc_obj(struct sjoyff_device); if (!sjoyff) return -ENOMEM; diff --git a/drivers/hid/hid-thrustmaster.c b/drivers/hid/hid-thrustmaster.c index 15847eef4ac0..48a79c97b7d0 100644 --- a/drivers/hid/hid-thrustmaster.c +++ b/drivers/hid/hid-thrustmaster.c @@ -308,7 +308,7 @@ static int thrustmaster_probe(struct hid_device *hdev, const struct hid_device_i } // Now we allocate the tm_wheel - tm_wheel = kzalloc_obj(struct tm_wheel, GFP_KERNEL); + tm_wheel = kzalloc_obj(struct tm_wheel); if (!tm_wheel) { ret = -ENOMEM; goto error1; @@ -328,7 +328,7 @@ static int thrustmaster_probe(struct hid_device *hdev, const struct hid_device_i goto error3; } - tm_wheel->response = kzalloc_obj(struct tm_wheel_response, GFP_KERNEL); + tm_wheel->response = kzalloc_obj(struct tm_wheel_response); if (!tm_wheel->response) { ret = -ENOMEM; goto error4; diff --git a/drivers/hid/hid-tmff.c b/drivers/hid/hid-tmff.c index ddb2629ed9e1..423f395d01ac 100644 --- a/drivers/hid/hid-tmff.c +++ b/drivers/hid/hid-tmff.c @@ -132,7 +132,7 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits) hidinput = list_entry(hid->inputs.next, struct hid_input, list); input_dev = hidinput->input; - tmff = kzalloc_obj(struct tmff_device, GFP_KERNEL); + tmff = kzalloc_obj(struct tmff_device); if (!tmff) return -ENOMEM; diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c index 21b1d865bd0d..ed16f50f21ed 100644 --- a/drivers/hid/hid-uclogic-params.c +++ b/drivers/hid/hid-uclogic-params.c @@ -1358,13 +1358,13 @@ static int uclogic_params_ugee_v2_init_event_hooks(struct hid_device *hdev, if (!uclogic_params_ugee_v2_has_battery(hdev)) return 0; - p->event_hooks = kzalloc_obj(*p->event_hooks, GFP_KERNEL); + p->event_hooks = kzalloc_obj(*p->event_hooks); if (!p->event_hooks) return -ENOMEM; INIT_LIST_HEAD(&p->event_hooks->list); - event_hook = kzalloc_obj(*event_hook, GFP_KERNEL); + event_hook = kzalloc_obj(*event_hook); if (!event_hook) return -ENOMEM; diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index c24ccfc7c05a..63c4fa8fbb9b 100644 --- a/drivers/hid/hid-wiimote-core.c +++ b/drivers/hid/hid-wiimote-core.c @@ -1737,7 +1737,7 @@ static struct wiimote_data *wiimote_create(struct hid_device *hdev) { struct wiimote_data *wdata; - wdata = kzalloc_obj(*wdata, GFP_KERNEL); + wdata = kzalloc_obj(*wdata); if (!wdata) return NULL; diff --git a/drivers/hid/hid-wiimote-debug.c b/drivers/hid/hid-wiimote-debug.c index 07d7137acfd4..5f74917781f2 100644 --- a/drivers/hid/hid-wiimote-debug.c +++ b/drivers/hid/hid-wiimote-debug.c @@ -174,7 +174,7 @@ int wiidebug_init(struct wiimote_data *wdata) struct wiimote_debug *dbg; unsigned long flags; - dbg = kzalloc_obj(*dbg, GFP_KERNEL); + dbg = kzalloc_obj(*dbg); if (!dbg) return -ENOMEM; diff --git a/drivers/hid/hid-zpff.c b/drivers/hid/hid-zpff.c index b9d94b3fe8b2..d8e023c8aa84 100644 --- a/drivers/hid/hid-zpff.c +++ b/drivers/hid/hid-zpff.c @@ -71,7 +71,7 @@ static int zpff_init(struct hid_device *hid) return -ENODEV; } - zpff = kzalloc_obj(struct zpff_device, GFP_KERNEL); + zpff = kzalloc_obj(struct zpff_device); if (!zpff) return -ENOMEM; diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index c3cd8521b695..9129fabed181 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c @@ -281,7 +281,7 @@ static int hidraw_open(struct inode *inode, struct file *file) unsigned long flags; int err = 0; - if (!(list = kzalloc_obj(struct hidraw_list, GFP_KERNEL))) { + if (!(list = kzalloc_obj(struct hidraw_list))) { err = -ENOMEM; goto out; } @@ -603,7 +603,7 @@ int hidraw_connect(struct hid_device *hid) /* we accept any HID device, all applications */ - dev = kzalloc_obj(struct hidraw, GFP_KERNEL); + dev = kzalloc_obj(struct hidraw); if (!dev) return -ENOMEM; diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c b/drivers/hid/intel-ish-hid/ishtp-hid.c index 48f06c93a07b..6e255b1bc721 100644 --- a/drivers/hid/intel-ish-hid/ishtp-hid.c +++ b/drivers/hid/intel-ish-hid/ishtp-hid.c @@ -214,7 +214,7 @@ int ishtp_hid_probe(unsigned int cur_hid_dev, if (IS_ERR(hid)) return PTR_ERR(hid); - hid_data = kzalloc_obj(*hid_data, GFP_KERNEL); + hid_data = kzalloc_obj(*hid_data); if (!hid_data) { rv = -ENOMEM; goto err_hid_data; diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c index ff60be49f2b8..44db90ad5495 100644 --- a/drivers/hid/intel-ish-hid/ishtp/bus.c +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c @@ -435,7 +435,7 @@ static struct ishtp_cl_device *ishtp_bus_add_device(struct ishtp_device *dev, } spin_unlock_irqrestore(&dev->device_list_lock, flags); - device = kzalloc_obj(struct ishtp_cl_device, GFP_KERNEL); + device = kzalloc_obj(struct ishtp_cl_device); if (!device) return NULL; diff --git a/drivers/hid/intel-ish-hid/ishtp/client-buffers.c b/drivers/hid/intel-ish-hid/ishtp/client-buffers.c index 717276f8460a..45ddc9a047bc 100644 --- a/drivers/hid/intel-ish-hid/ishtp/client-buffers.c +++ b/drivers/hid/intel-ish-hid/ishtp/client-buffers.c @@ -66,7 +66,7 @@ int ishtp_cl_alloc_tx_ring(struct ishtp_cl *cl) for (j = 0; j < cl->tx_ring_size; ++j) { struct ishtp_cl_tx_ring *tx_buf; - tx_buf = kzalloc_obj(struct ishtp_cl_tx_ring, GFP_KERNEL); + tx_buf = kzalloc_obj(struct ishtp_cl_tx_ring); if (!tx_buf) goto out; @@ -183,7 +183,7 @@ struct ishtp_cl_rb *ishtp_io_rb_init(struct ishtp_cl *cl) { struct ishtp_cl_rb *rb; - rb = kzalloc_obj(struct ishtp_cl_rb, GFP_KERNEL); + rb = kzalloc_obj(struct ishtp_cl_rb); if (!rb) return NULL; diff --git a/drivers/hid/intel-ish-hid/ishtp/client.c b/drivers/hid/intel-ish-hid/ishtp/client.c index f22b2f85e70f..4824f3302927 100644 --- a/drivers/hid/intel-ish-hid/ishtp/client.c +++ b/drivers/hid/intel-ish-hid/ishtp/client.c @@ -105,7 +105,7 @@ struct ishtp_cl *ishtp_cl_allocate(struct ishtp_cl_device *cl_device) { struct ishtp_cl *cl; - cl = kmalloc_obj(struct ishtp_cl, GFP_KERNEL); + cl = kmalloc_obj(struct ishtp_cl); if (!cl) return NULL; diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index a4f57143642c..524b53a3c87b 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c @@ -110,7 +110,7 @@ static int uhid_queue_event(struct uhid_device *uhid, __u32 event) unsigned long flags; struct uhid_event *ev; - ev = kzalloc_obj(*ev, GFP_KERNEL); + ev = kzalloc_obj(*ev); if (!ev) return -ENOMEM; @@ -129,7 +129,7 @@ static int uhid_hid_start(struct hid_device *hid) struct uhid_event *ev; unsigned long flags; - ev = kzalloc_obj(*ev, GFP_KERNEL); + ev = kzalloc_obj(*ev); if (!ev) return -ENOMEM; @@ -240,7 +240,7 @@ static int uhid_hid_get_report(struct hid_device *hid, unsigned char rnum, if (!READ_ONCE(uhid->running)) return -EIO; - ev = kzalloc_obj(*ev, GFP_KERNEL); + ev = kzalloc_obj(*ev); if (!ev) return -ENOMEM; @@ -282,7 +282,7 @@ static int uhid_hid_set_report(struct hid_device *hid, unsigned char rnum, if (!READ_ONCE(uhid->running) || count > UHID_DATA_MAX) return -EIO; - ev = kzalloc_obj(*ev, GFP_KERNEL); + ev = kzalloc_obj(*ev); if (!ev) return -ENOMEM; @@ -365,7 +365,7 @@ static int uhid_hid_output_raw(struct hid_device *hid, __u8 *buf, size_t count, if (count < 1 || count > UHID_DATA_MAX) return -EINVAL; - ev = kzalloc_obj(*ev, GFP_KERNEL); + ev = kzalloc_obj(*ev); if (!ev) return -ENOMEM; @@ -433,7 +433,7 @@ static int uhid_event_from_user(const char __user *buffer, size_t len, */ struct uhid_create_req_compat *compat; - compat = kzalloc_obj(*compat, GFP_KERNEL); + compat = kzalloc_obj(*compat); if (!compat) return -ENOMEM; @@ -636,7 +636,7 @@ static int uhid_char_open(struct inode *inode, struct file *file) { struct uhid_device *uhid; - uhid = kzalloc_obj(*uhid, GFP_KERNEL); + uhid = kzalloc_obj(*uhid); if (!uhid) return -ENOMEM; diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 922022a9c253..ddd5d77fb5a5 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -858,7 +858,7 @@ static int hid_alloc_buffers(struct usb_device *dev, struct hid_device *hid) &usbhid->inbuf_dma); usbhid->outbuf = usb_alloc_coherent(dev, usbhid->bufsize, GFP_KERNEL, &usbhid->outbuf_dma); - usbhid->cr = kmalloc_obj(*usbhid->cr, GFP_KERNEL); + usbhid->cr = kmalloc_obj(*usbhid->cr); usbhid->ctrlbuf = usb_alloc_coherent(dev, usbhid->bufsize, GFP_KERNEL, &usbhid->ctrlbuf_dma); if (!usbhid->inbuf || !usbhid->outbuf || !usbhid->cr || @@ -1430,7 +1430,7 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id * if (usb_string(dev, dev->descriptor.iSerialNumber, hid->uniq, 64) <= 0) hid->uniq[0] = 0; - usbhid = kzalloc_obj(*usbhid, GFP_KERNEL); + usbhid = kzalloc_obj(*usbhid); if (usbhid == NULL) { ret = -ENOMEM; goto err; diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c index 6719c976a3c3..fdcf03408f47 100644 --- a/drivers/hid/usbhid/hid-pidff.c +++ b/drivers/hid/usbhid/hid-pidff.c @@ -1528,7 +1528,7 @@ int hid_pidff_init_with_quirks(struct hid_device *hid, u32 initial_quirks) return -ENODEV; } - pidff = kzalloc_obj(*pidff, GFP_KERNEL); + pidff = kzalloc_obj(*pidff); if (!pidff) return -ENOMEM; diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index 3a115ea49cd2..6378801b22c6 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c @@ -434,7 +434,7 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, struct hid_field *field; int i; - uref_multi = kmalloc_obj(struct hiddev_usage_ref_multi, GFP_KERNEL); + uref_multi = kmalloc_obj(struct hiddev_usage_ref_multi); if (!uref_multi) return -ENOMEM; uref = &uref_multi->uref; @@ -890,7 +890,7 @@ int hiddev_connect(struct hid_device *hid, unsigned int force) return -EINVAL; } - if (!(hiddev = kzalloc_obj(struct hiddev, GFP_KERNEL))) + if (!(hiddev = kzalloc_obj(struct hiddev))) return -ENOMEM; init_waitqueue_head(&hiddev->wait); diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c index d32a860c6979..6b33e6ad0846 100644 --- a/drivers/hid/usbhid/usbkbd.c +++ b/drivers/hid/usbhid/usbkbd.c @@ -241,7 +241,7 @@ static int usb_kbd_alloc_mem(struct usb_device *dev, struct usb_kbd *kbd) return -1; if (!(kbd->new = usb_alloc_coherent(dev, 8, GFP_KERNEL, &kbd->new_dma))) return -1; - if (!(kbd->cr = kmalloc_obj(struct usb_ctrlrequest, GFP_KERNEL))) + if (!(kbd->cr = kmalloc_obj(struct usb_ctrlrequest))) return -1; if (!(kbd->leds = usb_alloc_coherent(dev, 1, GFP_KERNEL, &kbd->leds_dma))) return -1; @@ -281,7 +281,7 @@ static int usb_kbd_probe(struct usb_interface *iface, pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); maxp = usb_maxpacket(dev, pipe); - kbd = kzalloc_obj(struct usb_kbd, GFP_KERNEL); + kbd = kzalloc_obj(struct usb_kbd); input_dev = input_allocate_device(); if (!kbd || !input_dev) goto fail1; diff --git a/drivers/hid/usbhid/usbmouse.c b/drivers/hid/usbhid/usbmouse.c index da0d30de1d26..7cc4f9558e5f 100644 --- a/drivers/hid/usbhid/usbmouse.c +++ b/drivers/hid/usbhid/usbmouse.c @@ -125,7 +125,7 @@ static int usb_mouse_probe(struct usb_interface *intf, const struct usb_device_i pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); maxp = usb_maxpacket(dev, pipe); - mouse = kzalloc_obj(struct usb_mouse, GFP_KERNEL); + mouse = kzalloc_obj(struct usb_mouse); input_dev = input_allocate_device(); if (!mouse || !input_dev) goto fail1; diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index e2e9f8afec11..0d1c6d90fe21 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -892,7 +892,7 @@ static int wacom_add_shared_data(struct hid_device *hdev) data = wacom_get_hdev_data(hdev); if (!data) { - data = kzalloc_obj(struct wacom_hdev_data, GFP_KERNEL); + data = kzalloc_obj(struct wacom_hdev_data); if (!data) { mutex_unlock(&wacom_udev_list_lock); return -ENOMEM; |
