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/clk/st | |
| 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/clk/st')
| -rw-r--r-- | drivers/clk/st/clk-flexgen.c | 6 | ||||
| -rw-r--r-- | drivers/clk/st/clkgen-fsyn.c | 10 | ||||
| -rw-r--r-- | drivers/clk/st/clkgen-pll.c | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c index ea14dec68fef..6362ffb73b0b 100644 --- a/drivers/clk/st/clk-flexgen.c +++ b/drivers/clk/st/clk-flexgen.c @@ -213,7 +213,7 @@ static struct clk *clk_register_flexgen(const char *name, u32 xbar_shift; void __iomem *xbar_reg, *fdiv_reg; - fgxbar = kzalloc_obj(struct flexgen, GFP_KERNEL); + fgxbar = kzalloc_obj(struct flexgen); if (!fgxbar) return ERR_PTR(-ENOMEM); @@ -596,7 +596,7 @@ static void __init st_of_flexgen_setup(struct device_node *np) clk_mode = data->mode; } - clk_data = kzalloc_obj(*clk_data, GFP_KERNEL); + clk_data = kzalloc_obj(*clk_data); if (!clk_data) goto err; @@ -617,7 +617,7 @@ static void __init st_of_flexgen_setup(struct device_node *np) if (!clk_data->clks) goto err; - rlock = kzalloc_obj(spinlock_t, GFP_KERNEL); + rlock = kzalloc_obj(spinlock_t); if (!rlock) goto err; diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st/clkgen-fsyn.c index 74dd344eba4f..3fcc1da20c04 100644 --- a/drivers/clk/st/clkgen-fsyn.c +++ b/drivers/clk/st/clkgen-fsyn.c @@ -454,7 +454,7 @@ static struct clk * __init st_clk_register_quadfs_pll( if (WARN_ON(!name || !parent_name)) return ERR_PTR(-EINVAL); - pll = kzalloc_obj(*pll, GFP_KERNEL); + pll = kzalloc_obj(*pll); if (!pll) return ERR_PTR(-ENOMEM); @@ -894,7 +894,7 @@ static struct clk * __init st_clk_register_quadfs_fsynth( if (WARN_ON(!name || !parent_name)) return ERR_PTR(-EINVAL); - fs = kzalloc_obj(*fs, GFP_KERNEL); + fs = kzalloc_obj(*fs); if (!fs) return ERR_PTR(-ENOMEM); @@ -926,12 +926,12 @@ static void __init st_of_create_quadfs_fsynths( struct clk_onecell_data *clk_data; int fschan; - clk_data = kzalloc_obj(*clk_data, GFP_KERNEL); + clk_data = kzalloc_obj(*clk_data); if (!clk_data) return; clk_data->clk_num = QUADFS_MAX_CHAN; - clk_data->clks = kzalloc_objs(struct clk *, QUADFS_MAX_CHAN, GFP_KERNEL); + clk_data->clks = kzalloc_objs(struct clk *, QUADFS_MAX_CHAN); if (!clk_data->clks) { kfree(clk_data); @@ -1012,7 +1012,7 @@ static void __init st_of_quadfs_setup(struct device_node *np, if (!pll_name) return; - lock = kzalloc_obj(*lock, GFP_KERNEL); + lock = kzalloc_obj(*lock); if (!lock) goto err_exit; diff --git a/drivers/clk/st/clkgen-pll.c b/drivers/clk/st/clkgen-pll.c index 9a6b0df5aabc..38d1d2e357f3 100644 --- a/drivers/clk/st/clkgen-pll.c +++ b/drivers/clk/st/clkgen-pll.c @@ -656,7 +656,7 @@ static struct clk * __init clkgen_pll_register(const char *parent_name, struct clk *clk; struct clk_init_data init; - pll = kzalloc_obj(*pll, GFP_KERNEL); + pll = kzalloc_obj(*pll); if (!pll) return ERR_PTR(-ENOMEM); @@ -716,7 +716,7 @@ static struct clk * __init clkgen_odf_register(const char *parent_name, flags = pll_flags | CLK_GET_RATE_NOCACHE | CLK_SET_RATE_PARENT; - gate = kzalloc_obj(*gate, GFP_KERNEL); + gate = kzalloc_obj(*gate); if (!gate) return ERR_PTR(-ENOMEM); @@ -725,7 +725,7 @@ static struct clk * __init clkgen_odf_register(const char *parent_name, gate->bit_idx = pll_data->odf_gate[odf].shift; gate->lock = odf_lock; - div = kzalloc_obj(*div, GFP_KERNEL); + div = kzalloc_obj(*div); if (!div) { kfree(gate); return ERR_PTR(-ENOMEM); @@ -783,7 +783,7 @@ static void __init clkgen_c32_pll_setup(struct device_node *np, num_odfs = datac->data->num_odfs; - clk_data = kzalloc_obj(*clk_data, GFP_KERNEL); + clk_data = kzalloc_obj(*clk_data); if (!clk_data) return; |
