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/input/joystick | |
| 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/input/joystick')
29 files changed, 32 insertions, 32 deletions
diff --git a/drivers/input/joystick/a3d.c b/drivers/input/joystick/a3d.c index 07bd0083d654..48a1457961ef 100644 --- a/drivers/input/joystick/a3d.c +++ b/drivers/input/joystick/a3d.c @@ -249,7 +249,7 @@ static int a3d_connect(struct gameport *gameport, struct gameport_driver *drv) int i; int err; - a3d = kzalloc_obj(*a3d, GFP_KERNEL); + a3d = kzalloc_obj(*a3d); input_dev = input_allocate_device(); if (!a3d || !input_dev) { err = -ENOMEM; diff --git a/drivers/input/joystick/adi.c b/drivers/input/joystick/adi.c index fa7d0b80e7b7..e07b71978509 100644 --- a/drivers/input/joystick/adi.c +++ b/drivers/input/joystick/adi.c @@ -456,7 +456,7 @@ static int adi_connect(struct gameport *gameport, struct gameport_driver *drv) int i; int err; - port = kzalloc_obj(*port, GFP_KERNEL); + port = kzalloc_obj(*port); if (!port) return -ENOMEM; diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c index 79ed2363b8e5..b6f7bce1c14f 100644 --- a/drivers/input/joystick/analog.c +++ b/drivers/input/joystick/analog.c @@ -582,7 +582,7 @@ static int analog_connect(struct gameport *gameport, struct gameport_driver *drv int i; int err; - port = kzalloc_obj(*port, GFP_KERNEL); + port = kzalloc_obj(*port); if (!port) return -ENOMEM; diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c index 2d1a23866e64..7b4d61626898 100644 --- a/drivers/input/joystick/as5011.c +++ b/drivers/input/joystick/as5011.c @@ -237,7 +237,7 @@ static int as5011_probe(struct i2c_client *client) return -ENODEV; } - as5011 = kmalloc_obj(*as5011, GFP_KERNEL); + as5011 = kmalloc_obj(*as5011); input_dev = input_allocate_device(); if (!as5011 || !input_dev) { dev_err(&client->dev, diff --git a/drivers/input/joystick/cobra.c b/drivers/input/joystick/cobra.c index 781cec6b2b24..ffa6d49c81fe 100644 --- a/drivers/input/joystick/cobra.c +++ b/drivers/input/joystick/cobra.c @@ -141,7 +141,7 @@ static int cobra_connect(struct gameport *gameport, struct gameport_driver *drv) int i, j; int err; - cobra = kzalloc_obj(*cobra, GFP_KERNEL); + cobra = kzalloc_obj(*cobra); if (!cobra) return -ENOMEM; diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c index 165096fc0a55..e5d9b71aab99 100644 --- a/drivers/input/joystick/db9.c +++ b/drivers/input/joystick/db9.c @@ -585,7 +585,7 @@ static void db9_attach(struct parport *pp) return; } - db9 = kzalloc_obj(*db9, GFP_KERNEL); + db9 = kzalloc_obj(*db9); if (!db9) goto err_unreg_pardev; diff --git a/drivers/input/joystick/fsia6b.c b/drivers/input/joystick/fsia6b.c index 0bd7d4bd562a..b0d73648477e 100644 --- a/drivers/input/joystick/fsia6b.c +++ b/drivers/input/joystick/fsia6b.c @@ -132,7 +132,7 @@ static int fsia6b_serio_connect(struct serio *serio, struct serio_driver *drv) int i, j; int sw_id = 0; - fsia6b = kzalloc_obj(*fsia6b, GFP_KERNEL); + fsia6b = kzalloc_obj(*fsia6b); if (!fsia6b) return -ENOMEM; diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index 03d0e491b688..d84d453b51af 100644 --- a/drivers/input/joystick/gamecon.c +++ b/drivers/input/joystick/gamecon.c @@ -291,7 +291,7 @@ static int gc_n64_init_ff(struct input_dev *dev, int i) struct gc_subdev *sdev; int err; - sdev = kmalloc_obj(*sdev, GFP_KERNEL); + sdev = kmalloc_obj(*sdev); if (!sdev) return -ENOMEM; @@ -948,7 +948,7 @@ static void gc_attach(struct parport *pp) return; } - gc = kzalloc_obj(*gc, GFP_KERNEL); + gc = kzalloc_obj(*gc); if (!gc) { pr_err("Not enough memory\n"); goto err_unreg_pardev; diff --git a/drivers/input/joystick/gf2k.c b/drivers/input/joystick/gf2k.c index 23dc98146ccd..5a1cdce0bc48 100644 --- a/drivers/input/joystick/gf2k.c +++ b/drivers/input/joystick/gf2k.c @@ -222,7 +222,7 @@ static int gf2k_connect(struct gameport *gameport, struct gameport_driver *drv) unsigned char data[GF2K_LENGTH]; int i, err; - gf2k = kzalloc_obj(*gf2k, GFP_KERNEL); + gf2k = kzalloc_obj(*gf2k); input_dev = input_allocate_device(); if (!gf2k || !input_dev) { err = -ENOMEM; diff --git a/drivers/input/joystick/grip.c b/drivers/input/joystick/grip.c index f500a32d1ea7..2a3f768a7218 100644 --- a/drivers/input/joystick/grip.c +++ b/drivers/input/joystick/grip.c @@ -284,7 +284,7 @@ static int grip_connect(struct gameport *gameport, struct gameport_driver *drv) int i, j, t; int err; - grip = kzalloc_obj(*grip, GFP_KERNEL); + grip = kzalloc_obj(*grip); if (!grip) return -ENOMEM; diff --git a/drivers/input/joystick/grip_mp.c b/drivers/input/joystick/grip_mp.c index 7d90d8e5485b..62fdd0831c83 100644 --- a/drivers/input/joystick/grip_mp.c +++ b/drivers/input/joystick/grip_mp.c @@ -632,7 +632,7 @@ static int grip_connect(struct gameport *gameport, struct gameport_driver *drv) struct grip_mp *grip; int err; - grip = kzalloc_obj(*grip, GFP_KERNEL); + grip = kzalloc_obj(*grip); if (!grip) return -ENOMEM; diff --git a/drivers/input/joystick/guillemot.c b/drivers/input/joystick/guillemot.c index eb7faaf3f020..13f0fa4d3938 100644 --- a/drivers/input/joystick/guillemot.c +++ b/drivers/input/joystick/guillemot.c @@ -163,7 +163,7 @@ static int guillemot_connect(struct gameport *gameport, struct gameport_driver * int i, t; int err; - guillemot = kzalloc_obj(*guillemot, GFP_KERNEL); + guillemot = kzalloc_obj(*guillemot); input_dev = input_allocate_device(); if (!guillemot || !input_dev) { err = -ENOMEM; diff --git a/drivers/input/joystick/iforce/iforce-serio.c b/drivers/input/joystick/iforce/iforce-serio.c index 0ca2f9bfb17b..e235834888d2 100644 --- a/drivers/input/joystick/iforce/iforce-serio.c +++ b/drivers/input/joystick/iforce/iforce-serio.c @@ -185,7 +185,7 @@ static int iforce_serio_connect(struct serio *serio, struct serio_driver *drv) struct iforce_serio *iforce_serio; int err; - iforce_serio = kzalloc_obj(*iforce_serio, GFP_KERNEL); + iforce_serio = kzalloc_obj(*iforce_serio); if (!iforce_serio) return -ENOMEM; diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index b41d0b962e3d..0482eaaecf39 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c @@ -207,7 +207,7 @@ static int iforce_usb_probe(struct usb_interface *intf, if (!usb_endpoint_is_int_out(epout)) return -ENODEV; - iforce_usb = kzalloc_obj(*iforce_usb, GFP_KERNEL); + iforce_usb = kzalloc_obj(*iforce_usb); if (!iforce_usb) goto fail; diff --git a/drivers/input/joystick/interact.c b/drivers/input/joystick/interact.c index 88aa77d1fc36..507cec36b220 100644 --- a/drivers/input/joystick/interact.c +++ b/drivers/input/joystick/interact.c @@ -192,7 +192,7 @@ static int interact_connect(struct gameport *gameport, struct gameport_driver *d int i, t; int err; - interact = kzalloc_obj(*interact, GFP_KERNEL); + interact = kzalloc_obj(*interact); input_dev = input_allocate_device(); if (!interact || !input_dev) { err = -ENOMEM; diff --git a/drivers/input/joystick/joydump.c b/drivers/input/joystick/joydump.c index 9feda59dccde..c9cbdcc7f31f 100644 --- a/drivers/input/joystick/joydump.c +++ b/drivers/input/joystick/joydump.c @@ -61,7 +61,7 @@ static int joydump_connect(struct gameport *gameport, struct gameport_driver *dr timeout = gameport_time(gameport, 10000); /* 10 ms */ - buf = kmalloc_objs(struct joydump, BUF_SIZE, GFP_KERNEL); + buf = kmalloc_objs(struct joydump, BUF_SIZE); if (!buf) { printk(KERN_INFO "joydump: no memory for testing\n"); goto jd_end; diff --git a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c index 3b7f5840caeb..201a049c8c06 100644 --- a/drivers/input/joystick/magellan.c +++ b/drivers/input/joystick/magellan.c @@ -132,7 +132,7 @@ static int magellan_connect(struct serio *serio, struct serio_driver *drv) int err = -ENOMEM; int i; - magellan = kzalloc_obj(*magellan, GFP_KERNEL); + magellan = kzalloc_obj(*magellan); input_dev = input_allocate_device(); if (!magellan || !input_dev) goto fail1; diff --git a/drivers/input/joystick/maplecontrol.c b/drivers/input/joystick/maplecontrol.c index 2a811f302173..7f36f73844a9 100644 --- a/drivers/input/joystick/maplecontrol.c +++ b/drivers/input/joystick/maplecontrol.c @@ -102,7 +102,7 @@ static int probe_maple_controller(struct device *dev) struct input_dev *idev; unsigned long data = be32_to_cpu(mdev->devinfo.function_data[0]); - pad = kzalloc_obj(*pad, GFP_KERNEL); + pad = kzalloc_obj(*pad); idev = input_allocate_device(); if (!pad || !idev) { error = -ENOMEM; diff --git a/drivers/input/joystick/n64joy.c b/drivers/input/joystick/n64joy.c index b4203825e9e6..43a02bb99fc2 100644 --- a/drivers/input/joystick/n64joy.c +++ b/drivers/input/joystick/n64joy.c @@ -243,7 +243,7 @@ static int __init n64joy_probe(struct platform_device *pdev) int err = 0; u32 i, j, found = 0; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; mutex_init(&priv->n64joy_mutex); diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c index 645c822638ad..7f37d18c8477 100644 --- a/drivers/input/joystick/sidewinder.c +++ b/drivers/input/joystick/sidewinder.c @@ -578,7 +578,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) comment[0] = 0; - sw = kzalloc_obj(*sw, GFP_KERNEL); + sw = kzalloc_obj(*sw); buf = kmalloc(SW_LENGTH, GFP_KERNEL); idbuf = kmalloc(SW_LENGTH, GFP_KERNEL); if (!sw || !buf || !idbuf) { diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c index d562275aa4bc..1af299a41d13 100644 --- a/drivers/input/joystick/spaceball.c +++ b/drivers/input/joystick/spaceball.c @@ -199,7 +199,7 @@ static int spaceball_connect(struct serio *serio, struct serio_driver *drv) if ((id = serio->id.id) > SPACEBALL_MAX_ID) return -ENODEV; - spaceball = kmalloc_obj(*spaceball, GFP_KERNEL); + spaceball = kmalloc_obj(*spaceball); input_dev = input_allocate_device(); if (!spaceball || !input_dev) goto fail1; diff --git a/drivers/input/joystick/spaceorb.c b/drivers/input/joystick/spaceorb.c index 3aee84c19a25..ba5b318993ec 100644 --- a/drivers/input/joystick/spaceorb.c +++ b/drivers/input/joystick/spaceorb.c @@ -147,7 +147,7 @@ static int spaceorb_connect(struct serio *serio, struct serio_driver *drv) int err = -ENOMEM; int i; - spaceorb = kzalloc_obj(*spaceorb, GFP_KERNEL); + spaceorb = kzalloc_obj(*spaceorb); input_dev = input_allocate_device(); if (!spaceorb || !input_dev) goto fail1; diff --git a/drivers/input/joystick/stinger.c b/drivers/input/joystick/stinger.c index 81d4d1aa1752..011f9b137dca 100644 --- a/drivers/input/joystick/stinger.c +++ b/drivers/input/joystick/stinger.c @@ -118,7 +118,7 @@ static int stinger_connect(struct serio *serio, struct serio_driver *drv) struct input_dev *input_dev; int err = -ENOMEM; - stinger = kmalloc_obj(*stinger, GFP_KERNEL); + stinger = kmalloc_obj(*stinger); input_dev = input_allocate_device(); if (!stinger || !input_dev) goto fail1; diff --git a/drivers/input/joystick/tmdc.c b/drivers/input/joystick/tmdc.c index 8d1367fdc400..d419f41e62ac 100644 --- a/drivers/input/joystick/tmdc.c +++ b/drivers/input/joystick/tmdc.c @@ -264,7 +264,7 @@ static int tmdc_setup_port(struct tmdc *tmdc, int idx, unsigned char *data) int i, j, b = 0; int err; - tmdc->port[idx] = port = kzalloc_obj(struct tmdc_port, GFP_KERNEL); + tmdc->port[idx] = port = kzalloc_obj(struct tmdc_port); input_dev = input_allocate_device(); if (!port || !input_dev) { err = -ENOMEM; @@ -348,7 +348,7 @@ static int tmdc_connect(struct gameport *gameport, struct gameport_driver *drv) int i; int err; - tmdc = kzalloc_obj(*tmdc, GFP_KERNEL); + tmdc = kzalloc_obj(*tmdc); if (!tmdc) return -ENOMEM; diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c index 90cddb12efbb..4ee45f27290a 100644 --- a/drivers/input/joystick/turbografx.c +++ b/drivers/input/joystick/turbografx.c @@ -170,7 +170,7 @@ static void tgfx_attach(struct parport *pp) return; } - tgfx = kzalloc_obj(*tgfx, GFP_KERNEL); + tgfx = kzalloc_obj(*tgfx); if (!tgfx) { printk(KERN_ERR "turbografx.c: Not enough memory\n"); goto err_unreg_pardev; diff --git a/drivers/input/joystick/twidjoy.c b/drivers/input/joystick/twidjoy.c index e8f81d3a4d99..fb452552ceb2 100644 --- a/drivers/input/joystick/twidjoy.c +++ b/drivers/input/joystick/twidjoy.c @@ -171,7 +171,7 @@ static int twidjoy_connect(struct serio *serio, struct serio_driver *drv) int err = -ENOMEM; int i; - twidjoy = kzalloc_obj(*twidjoy, GFP_KERNEL); + twidjoy = kzalloc_obj(*twidjoy); input_dev = input_allocate_device(); if (!twidjoy || !input_dev) goto fail1; diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c index 45027058a777..2e1c6df98e24 100644 --- a/drivers/input/joystick/warrior.c +++ b/drivers/input/joystick/warrior.c @@ -124,7 +124,7 @@ static int warrior_connect(struct serio *serio, struct serio_driver *drv) struct input_dev *input_dev; int err = -ENOMEM; - warrior = kzalloc_obj(*warrior, GFP_KERNEL); + warrior = kzalloc_obj(*warrior); input_dev = input_allocate_device(); if (!warrior || !input_dev) goto fail1; diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 58ff39dee70c..bf4accf3f581 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -1744,7 +1744,7 @@ static int xpad_led_probe(struct usb_xpad *xpad) if (xpad->xtype != XTYPE_XBOX360 && xpad->xtype != XTYPE_XBOX360W) return 0; - xpad->led = led = kzalloc_obj(*led, GFP_KERNEL); + xpad->led = led = kzalloc_obj(*led); if (!led) return -ENOMEM; @@ -2077,7 +2077,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id break; } - xpad = kzalloc_obj(*xpad, GFP_KERNEL); + xpad = kzalloc_obj(*xpad); if (!xpad) return -ENOMEM; diff --git a/drivers/input/joystick/zhenhua.c b/drivers/input/joystick/zhenhua.c index 873e71fe6580..8ca1896639de 100644 --- a/drivers/input/joystick/zhenhua.c +++ b/drivers/input/joystick/zhenhua.c @@ -131,7 +131,7 @@ static int zhenhua_connect(struct serio *serio, struct serio_driver *drv) struct input_dev *input_dev; int err = -ENOMEM; - zhenhua = kzalloc_obj(*zhenhua, GFP_KERNEL); + zhenhua = kzalloc_obj(*zhenhua); input_dev = input_allocate_device(); if (!zhenhua || !input_dev) goto fail1; |
