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/usb/misc | |
| 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/usb/misc')
| -rw-r--r-- | drivers/usb/misc/adutux.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/apple-mfi-fastcharge.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/appledisplay.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/chaoskey.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/cypress_cy7c63.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/cytherm.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/idmouse.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/iowarrior.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/ldusb.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/legousbtower.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/lvstest.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/onboard_usb_dev.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/onboard_usb_dev_pdevs.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/sisusbvga/sisusbvga.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/trancevibrator.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/usb-ljca.c | 8 | ||||
| -rw-r--r-- | drivers/usb/misc/usbio.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/usblcd.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/usbsevseg.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/usbtest.c | 12 | ||||
| -rw-r--r-- | drivers/usb/misc/uss720.c | 2 | ||||
| -rw-r--r-- | drivers/usb/misc/yurex.c | 2 |
22 files changed, 30 insertions, 30 deletions
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c index 2c311dc92ab9..369d0d2ee2be 100644 --- a/drivers/usb/misc/adutux.c +++ b/drivers/usb/misc/adutux.c @@ -657,7 +657,7 @@ static int adu_probe(struct usb_interface *interface, int res; /* allocate memory for our device state and initialize it */ - dev = kzalloc_obj(struct adu_device, GFP_KERNEL); + dev = kzalloc_obj(struct adu_device); if (!dev) return -ENOMEM; diff --git a/drivers/usb/misc/apple-mfi-fastcharge.c b/drivers/usb/misc/apple-mfi-fastcharge.c index 8cf08fbda163..339f6cd2e9b2 100644 --- a/drivers/usb/misc/apple-mfi-fastcharge.c +++ b/drivers/usb/misc/apple-mfi-fastcharge.c @@ -184,7 +184,7 @@ static int mfi_fc_probe(struct usb_device *udev) if (!mfi_fc_match(udev)) return -ENODEV; - mfi = kzalloc_obj(struct mfi_device, GFP_KERNEL); + mfi = kzalloc_obj(struct mfi_device); if (!mfi) return -ENOMEM; diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c index e9b26cf7bcfc..4beebde59842 100644 --- a/drivers/usb/misc/appledisplay.c +++ b/drivers/usb/misc/appledisplay.c @@ -226,7 +226,7 @@ static int appledisplay_probe(struct usb_interface *iface, int_in_endpointAddr = endpoint->bEndpointAddress; /* allocate memory for our device state and initialize it */ - pdata = kzalloc_obj(struct appledisplay, GFP_KERNEL); + pdata = kzalloc_obj(struct appledisplay); if (!pdata) { retval = -ENOMEM; goto error; diff --git a/drivers/usb/misc/chaoskey.c b/drivers/usb/misc/chaoskey.c index 039e2b1bba00..d8016540953f 100644 --- a/drivers/usb/misc/chaoskey.c +++ b/drivers/usb/misc/chaoskey.c @@ -143,7 +143,7 @@ static int chaoskey_probe(struct usb_interface *interface, /* Looks good, allocate and initialize */ - dev = kzalloc_obj(struct chaoskey, GFP_KERNEL); + dev = kzalloc_obj(struct chaoskey); if (dev == NULL) goto out; diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c index ace0ec94506c..99185fc3e9df 100644 --- a/drivers/usb/misc/cypress_cy7c63.c +++ b/drivers/usb/misc/cypress_cy7c63.c @@ -211,7 +211,7 @@ static int cypress_probe(struct usb_interface *interface, int retval = -ENOMEM; /* allocate memory for our device state and initialize it */ - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) goto error_mem; diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c index 6af966118792..2bf082474e9d 100644 --- a/drivers/usb/misc/cytherm.c +++ b/drivers/usb/misc/cytherm.c @@ -307,7 +307,7 @@ static int cytherm_probe(struct usb_interface *interface, struct usb_cytherm *dev; int retval = -ENOMEM; - dev = kzalloc_obj(struct usb_cytherm, GFP_KERNEL); + dev = kzalloc_obj(struct usb_cytherm); if (!dev) goto error_mem; diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c index 1f649eedfa68..0f6b3464c2d6 100644 --- a/drivers/usb/misc/idmouse.c +++ b/drivers/usb/misc/idmouse.c @@ -330,7 +330,7 @@ static int idmouse_probe(struct usb_interface *interface, return -ENODEV; /* allocate memory for our device state and initialize it */ - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (dev == NULL) return -ENOMEM; diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index 5f882cb6ff07..18670dfed2e7 100644 --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c @@ -777,7 +777,7 @@ static int iowarrior_probe(struct usb_interface *interface, int res; /* allocate memory for our device state and initialize it */ - dev = kzalloc_obj(struct iowarrior, GFP_KERNEL); + dev = kzalloc_obj(struct iowarrior); if (!dev) return retval; diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index cb7125a5b27f..c74f142f6637 100644 --- a/drivers/usb/misc/ldusb.c +++ b/drivers/usb/misc/ldusb.c @@ -656,7 +656,7 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id * /* allocate memory for our device state and initialize it */ - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) goto exit; mutex_init(&dev->mutex); diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index a2909dee0d2a..052ffc2e71ee 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c @@ -748,7 +748,7 @@ static int tower_probe(struct usb_interface *interface, const struct usb_device_ int result; /* allocate memory for our device state and initialize it */ - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) goto exit; diff --git a/drivers/usb/misc/lvstest.c b/drivers/usb/misc/lvstest.c index 52d84e2d8193..9b6e10177f80 100644 --- a/drivers/usb/misc/lvstest.c +++ b/drivers/usb/misc/lvstest.c @@ -260,7 +260,7 @@ static ssize_t get_dev_desc_store(struct device *dev, struct usb_device_descriptor *descriptor; int ret; - descriptor = kmalloc_obj(*descriptor, GFP_KERNEL); + descriptor = kmalloc_obj(*descriptor); if (!descriptor) return -ENOMEM; diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c index 40572d7192f6..ba37eb99efba 100644 --- a/drivers/usb/misc/onboard_usb_dev.c +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -202,7 +202,7 @@ static int onboard_dev_add_usbdev(struct onboard_dev *onboard_dev, goto error; } - node = kzalloc_obj(*node, GFP_KERNEL); + node = kzalloc_obj(*node); if (!node) { err = -ENOMEM; goto error; diff --git a/drivers/usb/misc/onboard_usb_dev_pdevs.c b/drivers/usb/misc/onboard_usb_dev_pdevs.c index 2550108bf73c..cdb6949e18ec 100644 --- a/drivers/usb/misc/onboard_usb_dev_pdevs.c +++ b/drivers/usb/misc/onboard_usb_dev_pdevs.c @@ -109,7 +109,7 @@ void onboard_dev_create_pdevs(struct usb_device *parent_hub, struct list_head *p goto node_put; } - pdle = kzalloc_obj(*pdle, GFP_KERNEL); + pdle = kzalloc_obj(*pdle); if (!pdle) { of_platform_device_destroy(&pdev->dev, NULL); goto node_put; diff --git a/drivers/usb/misc/sisusbvga/sisusbvga.c b/drivers/usb/misc/sisusbvga/sisusbvga.c index be7e7abc47c6..3e75a7c24828 100644 --- a/drivers/usb/misc/sisusbvga/sisusbvga.c +++ b/drivers/usb/misc/sisusbvga/sisusbvga.c @@ -2797,7 +2797,7 @@ static int sisusb_probe(struct usb_interface *intf, dev->devnum); /* Allocate memory for our private */ - sisusb = kzalloc_obj(*sisusb, GFP_KERNEL); + sisusb = kzalloc_obj(*sisusb); if (!sisusb) return -ENOMEM; diff --git a/drivers/usb/misc/trancevibrator.c b/drivers/usb/misc/trancevibrator.c index a43f2ef30433..6aaec2db360b 100644 --- a/drivers/usb/misc/trancevibrator.c +++ b/drivers/usb/misc/trancevibrator.c @@ -86,7 +86,7 @@ static int tv_probe(struct usb_interface *interface, struct trancevibrator *dev; int retval; - dev = kzalloc_obj(struct trancevibrator, GFP_KERNEL); + dev = kzalloc_obj(struct trancevibrator); if (!dev) { retval = -ENOMEM; goto error; diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c index a959dd824f0e..7e85fd12da56 100644 --- a/drivers/usb/misc/usb-ljca.c +++ b/drivers/usb/misc/usb-ljca.c @@ -529,7 +529,7 @@ static int ljca_new_client_device(struct ljca_adapter *adap, u8 type, u8 id, struct ljca_client *client; int ret; - client = kzalloc_obj(*client, GFP_KERNEL); + client = kzalloc_obj(*client); if (!client) { kfree(data); return -ENOMEM; @@ -597,7 +597,7 @@ static int ljca_enumerate_gpio(struct ljca_adapter *adap) return -EINVAL; /* construct platform data */ - gpio_info = kzalloc_obj(*gpio_info, GFP_KERNEL); + gpio_info = kzalloc_obj(*gpio_info); if (!gpio_info) return -ENOMEM; gpio_info->num = gpio_num; @@ -630,7 +630,7 @@ static int ljca_enumerate_i2c(struct ljca_adapter *adap) for (i = 0; i < desc->num; i++) { /* construct platform data */ - i2c_info = kzalloc_obj(*i2c_info, GFP_KERNEL); + i2c_info = kzalloc_obj(*i2c_info); if (!i2c_info) return -ENOMEM; @@ -669,7 +669,7 @@ static int ljca_enumerate_spi(struct ljca_adapter *adap) for (i = 0; i < desc->num; i++) { /* construct platform data */ - spi_info = kzalloc_obj(*spi_info, GFP_KERNEL); + spi_info = kzalloc_obj(*spi_info); if (!spi_info) return -ENOMEM; diff --git a/drivers/usb/misc/usbio.c b/drivers/usb/misc/usbio.c index 50ff9f1ca78f..2e68d48a2cc0 100644 --- a/drivers/usb/misc/usbio.c +++ b/drivers/usb/misc/usbio.c @@ -439,7 +439,7 @@ static int usbio_add_client(struct usbio_device *usbio, char *name, u8 id, void struct auxiliary_device *adev; int ret; - client = kzalloc_obj(*client, GFP_KERNEL); + client = kzalloc_obj(*client); if (!client) return -ENOMEM; diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c index be798a293904..f794695dea9d 100644 --- a/drivers/usb/misc/usblcd.c +++ b/drivers/usb/misc/usblcd.c @@ -323,7 +323,7 @@ static int lcd_probe(struct usb_interface *interface, int retval; /* allocate memory for our device state and initialize it */ - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return -ENOMEM; diff --git a/drivers/usb/misc/usbsevseg.c b/drivers/usb/misc/usbsevseg.c index 97fcb35513ce..b37bf53dd54f 100644 --- a/drivers/usb/misc/usbsevseg.c +++ b/drivers/usb/misc/usbsevseg.c @@ -308,7 +308,7 @@ static int sevseg_probe(struct usb_interface *interface, struct usb_sevsegdev *mydev; int rc = -ENOMEM; - mydev = kzalloc_obj(struct usb_sevsegdev, GFP_KERNEL); + mydev = kzalloc_obj(struct usb_sevsegdev); if (!mydev) goto error_mem; diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 689cf82ce47d..98071b25ac07 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -545,7 +545,7 @@ alloc_sglist(int nents, int max, int vary, struct usbtest_dev *dev, int pipe) if (max == 0) return NULL; - sg = kmalloc_objs(*sg, nents, GFP_KERNEL); + sg = kmalloc_objs(*sg, nents); if (!sg) return NULL; sg_init_table(sg, nents); @@ -1221,7 +1221,7 @@ test_ctrl_queue(struct usbtest_dev *dev, struct usbtest_param_32 *param) * as with bulk/intr sglists, sglen is the queue depth; it also * controls which subtests run (more tests than sglen) or rerun. */ - urb = kzalloc_objs(struct urb *, param->sglen, GFP_KERNEL); + urb = kzalloc_objs(struct urb *, param->sglen); if (!urb) return -ENOMEM; for (i = 0; i < param->sglen; i++) { @@ -1370,7 +1370,7 @@ test_ctrl_queue(struct usbtest_dev *dev, struct usbtest_param_32 *param) if (!u) goto cleanup; - reqp = kmalloc_obj(*reqp, GFP_KERNEL); + reqp = kmalloc_obj(*reqp); if (!reqp) goto cleanup; reqp->setup = req; @@ -1572,7 +1572,7 @@ static int unlink_queued(struct usbtest_dev *dev, int pipe, unsigned num, memset(buf, 0, size); /* Allocate and init the urbs we'll queue */ - ctx.urbs = kzalloc_objs(struct urb *, num, GFP_KERNEL); + ctx.urbs = kzalloc_objs(struct urb *, num); if (!ctx.urbs) goto free_buf; for (i = 0; i < num; i++) { @@ -2052,7 +2052,7 @@ test_queue(struct usbtest_dev *dev, struct usbtest_param_32 *param, if (param->sglen > MAX_SGLEN) return -EINVAL; - urbs = kzalloc_objs(*urbs, param->sglen, GFP_KERNEL); + urbs = kzalloc_objs(*urbs, param->sglen); if (!urbs) return -ENOMEM; @@ -2786,7 +2786,7 @@ usbtest_probe(struct usb_interface *intf, const struct usb_device_id *id) } #endif - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return -ENOMEM; info = (struct usbtest_info *) id->driver_info; diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index 46356d099d26..ec8bd968c4de 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c @@ -701,7 +701,7 @@ static int uss720_probe(struct usb_interface *intf, /* * Allocate parport interface */ - priv = kzalloc_obj(struct parport_uss720_private, GFP_KERNEL); + priv = kzalloc_obj(struct parport_uss720_private); if (!priv) { usb_put_dev(usbdev); return -ENOMEM; diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c index 2e2057ef5b68..9189e4bb213a 100644 --- a/drivers/usb/misc/yurex.c +++ b/drivers/usb/misc/yurex.c @@ -197,7 +197,7 @@ static int yurex_probe(struct usb_interface *interface, const struct usb_device_ int res; /* allocate memory for our device state and initialize it */ - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) goto error; kref_init(&dev->kref); |
