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/storage | |
| 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/storage')
| -rw-r--r-- | drivers/usb/storage/ene_ub6250.c | 2 | ||||
| -rw-r--r-- | drivers/usb/storage/isd200.c | 2 | ||||
| -rw-r--r-- | drivers/usb/storage/onetouch.c | 2 | ||||
| -rw-r--r-- | drivers/usb/storage/realtek_cr.c | 2 | ||||
| -rw-r--r-- | drivers/usb/storage/sierra_ms.c | 4 | ||||
| -rw-r--r-- | drivers/usb/storage/usb.c | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c index 5a5f35213c1d..7622bc0426cd 100644 --- a/drivers/usb/storage/ene_ub6250.c +++ b/drivers/usb/storage/ene_ub6250.c @@ -2336,7 +2336,7 @@ static int ene_ub6250_probe(struct usb_interface *intf, return result; /* FIXME: where should the code alloc extra buf ? */ - us->extra = kzalloc_obj(struct ene_ub6250_info, GFP_KERNEL); + us->extra = kzalloc_obj(struct ene_ub6250_info); if (!us->extra) return -ENOMEM; us->extra_destructor = ene_ub6250_info_destructor; diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c index 92113848913d..a4fd5dda3396 100644 --- a/drivers/usb/storage/isd200.c +++ b/drivers/usb/storage/isd200.c @@ -1463,7 +1463,7 @@ static int isd200_init_info(struct us_data *us) { struct isd200_info *info; - info = kzalloc_obj(struct isd200_info, GFP_KERNEL); + info = kzalloc_obj(struct isd200_info); if (!info) return -ENOMEM; diff --git a/drivers/usb/storage/onetouch.c b/drivers/usb/storage/onetouch.c index 083423606ad9..49d281f7bef6 100644 --- a/drivers/usb/storage/onetouch.c +++ b/drivers/usb/storage/onetouch.c @@ -183,7 +183,7 @@ static int onetouch_connect_input(struct us_data *ss) maxp = usb_maxpacket(udev, pipe); maxp = min(maxp, ONETOUCH_PKT_LEN); - onetouch = kzalloc_obj(struct usb_onetouch, GFP_KERNEL); + onetouch = kzalloc_obj(struct usb_onetouch); input_dev = input_allocate_device(); if (!onetouch || !input_dev) goto fail1; diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c index 12eb1ab224cd..af038b897c6b 100644 --- a/drivers/usb/storage/realtek_cr.c +++ b/drivers/usb/storage/realtek_cr.c @@ -976,7 +976,7 @@ static int init_realtek_cr(struct us_data *us) struct rts51x_chip *chip; int size, i, retval; - chip = kzalloc_obj(struct rts51x_chip, GFP_KERNEL); + chip = kzalloc_obj(struct rts51x_chip); if (!chip) return -ENOMEM; diff --git a/drivers/usb/storage/sierra_ms.c b/drivers/usb/storage/sierra_ms.c index 357e5d29da0c..c5e3eeeb2144 100644 --- a/drivers/usb/storage/sierra_ms.c +++ b/drivers/usb/storage/sierra_ms.c @@ -100,7 +100,7 @@ static ssize_t truinst_show(struct device *dev, struct device_attribute *attr, if (swi_tru_install == TRU_FORCE_MS) { result = sysfs_emit(buf, "Forced Mass Storage\n"); } else { - swocInfo = kmalloc_obj(struct swoc_info, GFP_KERNEL); + swocInfo = kmalloc_obj(struct swoc_info); if (!swocInfo) { sysfs_emit(buf, "Error\n"); return -ENOMEM; @@ -149,7 +149,7 @@ int sierra_ms_init(struct us_data *us) else { usb_stor_dbg(us, "SWIMS: Normal SWoC Logic\n"); - swocInfo = kmalloc_obj(struct swoc_info, GFP_KERNEL); + swocInfo = kmalloc_obj(struct swoc_info); if (!swocInfo) return -ENOMEM; diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 0d24d426a176..fa83fe0defe2 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -537,7 +537,7 @@ static int associate_dev(struct us_data *us, struct usb_interface *intf) usb_set_intfdata(intf, us); /* Allocate the control/setup and DMA-mapped buffers */ - us->cr = kmalloc_obj(*us->cr, GFP_KERNEL); + us->cr = kmalloc_obj(*us->cr); if (!us->cr) return -ENOMEM; |
