summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib-cdev.c
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/gpio/gpiolib-cdev.c
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/gpio/gpiolib-cdev.c')
-rw-r--r--drivers/gpio/gpiolib-cdev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index f50b067e1de3..fdc2a6539786 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -318,7 +318,7 @@ static int linehandle_create(struct gpio_device *gdev, void __user *ip)
if (ret)
return ret;
- lh = kzalloc_obj(*lh, GFP_KERNEL);
+ lh = kzalloc_obj(*lh);
if (!lh)
return -ENOMEM;
lh->gdev = gpio_device_get(gdev);
@@ -1280,7 +1280,7 @@ static long linereq_get_values(struct linereq *lr, void __user *ip)
if (num_get != 1) {
/* build compacted desc array */
- descs = kmalloc_objs(*descs, num_get, GFP_KERNEL);
+ descs = kmalloc_objs(*descs, num_get);
if (!descs)
return -ENOMEM;
for (didx = 0, i = 0; i < lr->num_lines; i++) {
@@ -1355,7 +1355,7 @@ static long linereq_set_values(struct linereq *lr, void __user *ip)
if (num_set != 1) {
/* build compacted desc array */
- descs = kmalloc_objs(*descs, num_set, GFP_KERNEL);
+ descs = kmalloc_objs(*descs, num_set);
if (!descs)
return -ENOMEM;
for (didx = 0, i = 0; i < lr->num_lines; i++) {
@@ -2054,7 +2054,7 @@ static int lineevent_create(struct gpio_device *gdev, void __user *ip)
(lflags & GPIOHANDLE_REQUEST_BIAS_PULL_UP)))
return -EINVAL;
- le = kzalloc_obj(*le, GFP_KERNEL);
+ le = kzalloc_obj(*le);
if (!le)
return -ENOMEM;
le->gdev = gpio_device_get(gdev);