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/media/rc | |
| 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/media/rc')
| -rw-r--r-- | drivers/media/rc/ati_remote.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/ene_ir.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/fintek-cir.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/iguanair.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/imon.c | 4 | ||||
| -rw-r--r-- | drivers/media/rc/ir_toy.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/ite-cir.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/lirc_dev.c | 4 | ||||
| -rw-r--r-- | drivers/media/rc/mceusb.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/nuvoton-cir.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/rc-ir-raw.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/rc-loopback.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/rc-main.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/redrat3.c | 8 | ||||
| -rw-r--r-- | drivers/media/rc/streamzap.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/ttusbir.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/winbond-cir.c | 2 | ||||
| -rw-r--r-- | drivers/media/rc/xbox_remote.c | 2 |
18 files changed, 23 insertions, 23 deletions
diff --git a/drivers/media/rc/ati_remote.c b/drivers/media/rc/ati_remote.c index 6bde5c913e99..78abe810a88e 100644 --- a/drivers/media/rc/ati_remote.c +++ b/drivers/media/rc/ati_remote.c @@ -839,7 +839,7 @@ static int ati_remote_probe(struct usb_interface *interface, return -ENODEV; } - ati_remote = kzalloc_obj(struct ati_remote, GFP_KERNEL); + ati_remote = kzalloc_obj(struct ati_remote); rc_dev = rc_allocate_device(RC_DRIVER_SCANCODE); if (!ati_remote || !rc_dev) goto exit_free_dev_rdev; diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c index 6e61173ba233..f8120605501a 100644 --- a/drivers/media/rc/ene_ir.c +++ b/drivers/media/rc/ene_ir.c @@ -993,7 +993,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id) struct ene_device *dev; /* allocate memory */ - dev = kzalloc_obj(struct ene_device, GFP_KERNEL); + dev = kzalloc_obj(struct ene_device); rdev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!dev || !rdev) goto exit_free_dev_rdev; diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c index 92a38d04d979..f7cfa8a073eb 100644 --- a/drivers/media/rc/fintek-cir.c +++ b/drivers/media/rc/fintek-cir.c @@ -465,7 +465,7 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id struct rc_dev *rdev; int ret = -ENOMEM; - fintek = kzalloc_obj(struct fintek_dev, GFP_KERNEL); + fintek = kzalloc_obj(struct fintek_dev); if (!fintek) return ret; diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index bb5bd62c8645..c508f2536243 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c @@ -392,7 +392,7 @@ static int iguanair_probe(struct usb_interface *intf, if (idesc->desc.bNumEndpoints < 2) return -ENODEV; - ir = kzalloc_obj(*ir, GFP_KERNEL); + ir = kzalloc_obj(*ir); rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!ir || !rc) { ret = -ENOMEM; diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 0cb2ad180728..7e92161105d5 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c @@ -614,7 +614,7 @@ static int send_packet(struct imon_context *ictx) ictx->tx_urb->actual_length = 0; } else { /* fill request into kmalloc'ed space: */ - control_req = kmalloc_obj(*control_req, GFP_KERNEL); + control_req = kmalloc_obj(*control_req); if (control_req == NULL) return -ENOMEM; @@ -2233,7 +2233,7 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf, struct usb_host_interface *iface_desc; int ret = -ENOMEM; - ictx = kzalloc_obj(*ictx, GFP_KERNEL); + ictx = kzalloc_obj(*ictx); if (!ictx) goto exit; diff --git a/drivers/media/rc/ir_toy.c b/drivers/media/rc/ir_toy.c index cf3b27817131..d6472de5da87 100644 --- a/drivers/media/rc/ir_toy.c +++ b/drivers/media/rc/ir_toy.c @@ -418,7 +418,7 @@ static int irtoy_probe(struct usb_interface *intf, return -ENODEV; } - irtoy = kzalloc_obj(*irtoy, GFP_KERNEL); + irtoy = kzalloc_obj(*irtoy); if (!irtoy) return -ENOMEM; diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index 448f5c5db616..bf544517c67a 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c @@ -1304,7 +1304,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id int model_no; int io_rsrc_no; - itdev = kzalloc_obj(struct ite_dev, GFP_KERNEL); + itdev = kzalloc_obj(struct ite_dev); if (!itdev) return ret; diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 735b0630b172..183f1939b941 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -128,7 +128,7 @@ static int lirc_open(struct inode *inode, struct file *file) { struct rc_dev *dev = container_of(inode->i_cdev, struct rc_dev, lirc_cdev); - struct lirc_fh *fh = kzalloc_obj(*fh, GFP_KERNEL); + struct lirc_fh *fh = kzalloc_obj(*fh); unsigned long flags; int retval; @@ -267,7 +267,7 @@ static ssize_t lirc_transmit(struct file *file, const char __user *buf, goto out_unlock; } - raw = kmalloc_objs(*raw, LIRCBUF_SIZE, GFP_KERNEL); + raw = kmalloc_objs(*raw, LIRCBUF_SIZE); if (!raw) { ret = -ENOMEM; goto out_unlock; diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index d35fff006ac9..ed55e9ec3c57 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -1715,7 +1715,7 @@ static int mceusb_dev_probe(struct usb_interface *intf, pipe = usb_rcvbulkpipe(dev, ep_in->bEndpointAddress); maxp = usb_maxpacket(dev, pipe); - ir = kzalloc_obj(struct mceusb_dev, GFP_KERNEL); + ir = kzalloc_obj(struct mceusb_dev); if (!ir) goto mem_alloc_fail; diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index 4cf74ac2d76c..4e5a0c8dc9a0 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -639,7 +639,7 @@ static int nvt_ir_raw_set_wakeup_filter(struct rc_dev *dev, if (!sc_filter->mask) return 0; - raw = kmalloc_objs(*raw, WAKEUP_MAX_SIZE, GFP_KERNEL); + raw = kmalloc_objs(*raw, WAKEUP_MAX_SIZE); if (!raw) return -ENOMEM; diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c index d1f8bb6af874..2e269ef5e26b 100644 --- a/drivers/media/rc/rc-ir-raw.c +++ b/drivers/media/rc/rc-ir-raw.c @@ -615,7 +615,7 @@ int ir_raw_event_prepare(struct rc_dev *dev) if (!dev) return -EINVAL; - dev->raw = kzalloc_obj(*dev->raw, GFP_KERNEL); + dev->raw = kzalloc_obj(*dev->raw); if (!dev->raw) return -ENOMEM; diff --git a/drivers/media/rc/rc-loopback.c b/drivers/media/rc/rc-loopback.c index 959a1167d376..78ac09b3cbd3 100644 --- a/drivers/media/rc/rc-loopback.c +++ b/drivers/media/rc/rc-loopback.c @@ -185,7 +185,7 @@ static int loop_set_wakeup_filter(struct rc_dev *dev, return 0; /* encode the specified filter and loop it back */ - raw = kmalloc_objs(*raw, max, GFP_KERNEL); + raw = kmalloc_objs(*raw, max); if (!raw) return -ENOMEM; diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index b67af602fbe6..821607504008 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -1701,7 +1701,7 @@ struct rc_dev *rc_allocate_device(enum rc_driver_type type) { struct rc_dev *dev; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return NULL; diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 2471bb4d66b8..3b917a2a8918 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c @@ -502,7 +502,7 @@ static int redrat3_set_timeout(struct rc_dev *rc_dev, unsigned int timeoutus) __be32 *timeout; int ret; - timeout = kmalloc_obj(*timeout, GFP_KERNEL); + timeout = kmalloc_obj(*timeout); if (!timeout) return -ENOMEM; @@ -768,11 +768,11 @@ static int redrat3_transmit_ir(struct rc_dev *rcdev, unsigned *txbuf, /* rr3 will disable rc detector on transmit */ rr3->transmitting = true; - sample_lens = kzalloc_objs(*sample_lens, RR3_DRIVER_MAXLENS, GFP_KERNEL); + sample_lens = kzalloc_objs(*sample_lens, RR3_DRIVER_MAXLENS); if (!sample_lens) return -ENOMEM; - irdata = kzalloc_obj(*irdata, GFP_KERNEL); + irdata = kzalloc_obj(*irdata); if (!irdata) { ret = -ENOMEM; goto out; @@ -1020,7 +1020,7 @@ static int redrat3_dev_probe(struct usb_interface *intf, } /* allocate memory for our device state and initialize it */ - rr3 = kzalloc_obj(*rr3, GFP_KERNEL); + rr3 = kzalloc_obj(*rr3); if (!rr3) goto no_endpoints; diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c index 38e0db1b4964..5a18603f9a95 100644 --- a/drivers/media/rc/streamzap.c +++ b/drivers/media/rc/streamzap.c @@ -285,7 +285,7 @@ static int streamzap_probe(struct usb_interface *intf, int pipe, maxp; /* Allocate space for device driver specific data */ - sz = kzalloc_obj(struct streamzap_ir, GFP_KERNEL); + sz = kzalloc_obj(struct streamzap_ir); if (!sz) return -ENOMEM; diff --git a/drivers/media/rc/ttusbir.c b/drivers/media/rc/ttusbir.c index 8b70c1e809ed..110a46900114 100644 --- a/drivers/media/rc/ttusbir.c +++ b/drivers/media/rc/ttusbir.c @@ -187,7 +187,7 @@ static int ttusbir_probe(struct usb_interface *intf, int i, j, ret; int altsetting = -1; - tt = kzalloc_obj(*tt, GFP_KERNEL); + tt = kzalloc_obj(*tt); rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!tt || !rc) { ret = -ENOMEM; diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c index 875ead5240a5..515469dd82d4 100644 --- a/drivers/media/rc/winbond-cir.c +++ b/drivers/media/rc/winbond-cir.c @@ -1017,7 +1017,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) return -ENODEV; } - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) { err = -ENOMEM; goto exit; diff --git a/drivers/media/rc/xbox_remote.c b/drivers/media/rc/xbox_remote.c index 79c3bfe60437..3e3da70cf8da 100644 --- a/drivers/media/rc/xbox_remote.c +++ b/drivers/media/rc/xbox_remote.c @@ -213,7 +213,7 @@ static int xbox_remote_probe(struct usb_interface *interface, return -ENODEV; } - xbox_remote = kzalloc_obj(*xbox_remote, GFP_KERNEL); + xbox_remote = kzalloc_obj(*xbox_remote); rc_dev = rc_allocate_device(RC_DRIVER_SCANCODE); if (!xbox_remote || !rc_dev) goto exit_free_dev_rdev; |
