summaryrefslogtreecommitdiff
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/usb/class
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/cdc-acm.c2
-rw-r--r--drivers/usb/class/cdc-wdm.c6
-rw-r--r--drivers/usb/class/usblp.c2
-rw-r--r--drivers/usb/class/usbtmc.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 8816c6eaba1d..ad38c746270a 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1350,7 +1350,7 @@ skip_normal_probe:
made_compressed_probe:
dev_dbg(&intf->dev, "interfaces are valid\n");
- acm = kzalloc_obj(struct acm, GFP_KERNEL);
+ acm = kzalloc_obj(struct acm);
if (!acm)
return -ENOMEM;
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 28fc93e0c01d..f2d94cfc70af 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -1027,7 +1027,7 @@ static int wdm_create(struct usb_interface *intf, struct usb_endpoint_descriptor
int rv = -ENOMEM;
struct wdm_device *desc;
- desc = kzalloc_obj(struct wdm_device, GFP_KERNEL);
+ desc = kzalloc_obj(struct wdm_device);
if (!desc)
goto out;
INIT_LIST_HEAD(&desc->device_list);
@@ -1050,10 +1050,10 @@ static int wdm_create(struct usb_interface *intf, struct usb_endpoint_descriptor
desc->wMaxPacketSize = usb_endpoint_maxp(ep);
- desc->orq = kmalloc_obj(struct usb_ctrlrequest, GFP_KERNEL);
+ desc->orq = kmalloc_obj(struct usb_ctrlrequest);
if (!desc->orq)
goto err;
- desc->irq = kmalloc_obj(struct usb_ctrlrequest, GFP_KERNEL);
+ desc->irq = kmalloc_obj(struct usb_ctrlrequest);
if (!desc->irq)
goto err;
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 653583dc7a8d..669b9e6879bf 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -1142,7 +1142,7 @@ static int usblp_probe(struct usb_interface *intf,
/* Malloc and start initializing usblp structure so we can use it
* directly. */
- usblp = kzalloc_obj(struct usblp, GFP_KERNEL);
+ usblp = kzalloc_obj(struct usblp);
if (!usblp) {
retval = -ENOMEM;
goto abort_ret;
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 20bc86367660..2526a0e03cde 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -172,7 +172,7 @@ static int usbtmc_open(struct inode *inode, struct file *filp)
return -ENODEV;
}
- file_data = kzalloc_obj(*file_data, GFP_KERNEL);
+ file_data = kzalloc_obj(*file_data);
if (!file_data)
return -ENOMEM;
@@ -2378,7 +2378,7 @@ static int usbtmc_probe(struct usb_interface *intf,
dev_dbg(&intf->dev, "%s called\n", __func__);
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;