summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 20:03:00 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 20:03:00 -0800
commit32a92f8c89326985e05dce8b22d3f0aa07a3e1bd (patch)
tree65f84985b9ed2d5cf3c5243aca78d9428e25c312 /drivers/pinctrl
parent323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (diff)
downloadlinux-next-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.tar.gz
linux-next-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.zip
Convert more 'alloc_obj' cases to default GFP_KERNEL arguments
This converts some of the visually simpler cases that have been split over multiple lines. I only did the ones that are easy to verify the resulting diff by having just that final GFP_KERNEL argument on the next line. Somebody should probably do a proper coccinelle script for this, but for me the trivial script actually resulted in an assertion failure in the middle of the script. I probably had made it a bit _too_ trivial. So after fighting that far a while I decided to just do some of the syntactically simpler cases with variations of the previous 'sed' scripts. The more syntactically complex multi-line cases would mostly really want whitespace cleanup anyway. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/bcm/pinctrl-bcm2835.c3
-rw-r--r--drivers/pinctrl/berlin/berlin.c3
-rw-r--r--drivers/pinctrl/pinctrl-apple-gpio.c3
-rw-r--r--drivers/pinctrl/sunxi/pinctrl-sunxi.c3
-rw-r--r--drivers/pinctrl/vt8500/pinctrl-wmt.c3
5 files changed, 5 insertions, 10 deletions
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 17d39c2d454b..e7b35019a5a7 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -873,8 +873,7 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
maps_per_pin++;
if (num_pulls)
maps_per_pin++;
- cur_map = maps = kzalloc_objs(*maps, num_pins * maps_per_pin,
- GFP_KERNEL);
+ cur_map = maps = kzalloc_objs(*maps, num_pins * maps_per_pin);
if (!maps)
return -ENOMEM;
diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c
index f58cb046e9ea..7971339e269f 100644
--- a/drivers/pinctrl/berlin/berlin.c
+++ b/drivers/pinctrl/berlin/berlin.c
@@ -215,8 +215,7 @@ static int berlin_pinctrl_build_state(struct platform_device *pdev)
}
/* we will reallocate later */
- pctrl->functions = kzalloc_objs(*pctrl->functions, max_functions,
- GFP_KERNEL);
+ pctrl->functions = kzalloc_objs(*pctrl->functions, max_functions);
if (!pctrl->functions)
return -ENOMEM;
diff --git a/drivers/pinctrl/pinctrl-apple-gpio.c b/drivers/pinctrl/pinctrl-apple-gpio.c
index c0ae52880b2e..6305b96aaa73 100644
--- a/drivers/pinctrl/pinctrl-apple-gpio.c
+++ b/drivers/pinctrl/pinctrl-apple-gpio.c
@@ -400,8 +400,7 @@ static int apple_gpio_register(struct apple_gpio_pinctrl *pctl)
girq->parents = kmalloc_array(girq->num_parents,
sizeof(*girq->parents),
GFP_KERNEL);
- irq_data = kmalloc_objs(*irq_data, girq->num_parents,
- GFP_KERNEL);
+ irq_data = kmalloc_objs(*irq_data, girq->num_parents);
if (!girq->parents || !irq_data) {
ret = -ENOMEM;
goto out_free_irq_data;
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
index fc9167e784be..48434292a39b 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
@@ -1328,8 +1328,7 @@ static int sunxi_pinctrl_build_state(struct platform_device *pdev)
* special functions per pin, plus one entry for the sentinel.
* We'll reallocate that later anyway.
*/
- pctl->functions = kzalloc_objs(*pctl->functions, 7 * pctl->ngroups + 4,
- GFP_KERNEL);
+ pctl->functions = kzalloc_objs(*pctl->functions, 7 * pctl->ngroups + 4);
if (!pctl->functions)
return -ENOMEM;
diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c
index 3da2f768f223..1c7624a6cb97 100644
--- a/drivers/pinctrl/vt8500/pinctrl-wmt.c
+++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c
@@ -344,8 +344,7 @@ static int wmt_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
if (num_pulls)
maps_per_pin++;
- cur_map = maps = kzalloc_objs(*maps, num_pins * maps_per_pin,
- GFP_KERNEL);
+ cur_map = maps = kzalloc_objs(*maps, num_pins * maps_per_pin);
if (!maps)
return -ENOMEM;