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/sh | |
| 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/sh')
| -rw-r--r-- | drivers/sh/clk/cpg.c | 2 | ||||
| -rw-r--r-- | drivers/sh/maple/maple.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/sh/clk/cpg.c b/drivers/sh/clk/cpg.c index 58e64a666b2f..f93b8d9d9ca8 100644 --- a/drivers/sh/clk/cpg.c +++ b/drivers/sh/clk/cpg.c @@ -459,7 +459,7 @@ int __init sh_clk_fsidiv_register(struct clk *clks, int nr) for (i = 0; i < nr; i++) { - map = kzalloc_obj(struct clk_mapping, GFP_KERNEL); + map = kzalloc_obj(struct clk_mapping); if (!map) { pr_err("%s: unable to alloc memory\n", __func__); return -ENOMEM; diff --git a/drivers/sh/maple/maple.c b/drivers/sh/maple/maple.c index c9c3ba77653a..5585f220e495 100644 --- a/drivers/sh/maple/maple.c +++ b/drivers/sh/maple/maple.c @@ -187,7 +187,7 @@ static struct mapleq *maple_allocq(struct maple_device *mdev) { struct mapleq *mq; - mq = kzalloc_obj(*mq, GFP_KERNEL); + mq = kzalloc_obj(*mq); if (!mq) goto failed_nomem; @@ -215,7 +215,7 @@ static struct maple_device *maple_alloc_dev(int port, int unit) /* zero this out to avoid kobj subsystem * thinking it has already been registered */ - mdev = kzalloc_obj(*mdev, GFP_KERNEL); + mdev = kzalloc_obj(*mdev); if (!mdev) return NULL; |
