Message ID | 20211015151425.29743-1-s.nawrocki@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | clk: samsung: Remove meaningless __init and extern from header files | expand |
On 15/10/2021 17:14, Sylwester Nawrocki wrote: > Remove useless __init atrribute and unneeded extern qualifier in function > declarations in header files. > > Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> > --- > drivers/clk/samsung/clk-cpu.h | 2 +- > drivers/clk/samsung/clk.h | 34 +++++++++++++++++----------------- > 2 files changed, 18 insertions(+), 18 deletions(-) > > diff --git a/drivers/clk/samsung/clk-cpu.h b/drivers/clk/samsung/clk-cpu.h > index af74686db9ef..fd885d2bf74c 100644 > --- a/drivers/clk/samsung/clk-cpu.h > +++ b/drivers/clk/samsung/clk-cpu.h > @@ -62,7 +62,7 @@ struct exynos_cpuclk { > #define CLK_CPU_HAS_E5433_REGS_LAYOUT (1 << 2) > }; > > -int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx, > +int exynos_register_cpu_clock(struct samsung_clk_provider *ctx, > unsigned int lookup_id, const char *name, > const struct clk_hw *parent, const struct clk_hw *alt_parent, > unsigned long offset, > diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h > index b23776d540eb..b46e83a2581f 100644 > --- a/drivers/clk/samsung/clk.h > +++ b/drivers/clk/samsung/clk.h > @@ -337,52 +337,52 @@ struct samsung_cmu_info { > const char *clk_name; > }; > > -extern struct samsung_clk_provider *__init samsung_clk_init( > +struct samsung_clk_provider * samsung_clk_init( > struct device_node *np, void __iomem *base, > unsigned long nr_clks); > -extern void __init samsung_clk_of_add_provider(struct device_node *np, > +void samsung_clk_of_add_provider(struct device_node *np, > struct samsung_clk_provider *ctx); > -extern void __init samsung_clk_of_register_fixed_ext( > +void samsung_clk_of_register_fixed_ext( > struct samsung_clk_provider *ctx, > struct samsung_fixed_rate_clock *fixed_rate_clk, > unsigned int nr_fixed_rate_clk, > const struct of_device_id *clk_matches); > > -extern void samsung_clk_add_lookup(struct samsung_clk_provider *ctx, > +void samsung_clk_add_lookup(struct samsung_clk_provider *ctx, > struct clk_hw *clk_hw, unsigned int id); > > -extern void __init samsung_clk_register_alias(struct samsung_clk_provider *ctx, > +void samsung_clk_register_alias(struct samsung_clk_provider *ctx, > const struct samsung_clock_alias *list, > unsigned int nr_clk); > -extern void __init samsung_clk_register_fixed_rate( > +void samsung_clk_register_fixed_rate( > struct samsung_clk_provider *ctx, > const struct samsung_fixed_rate_clock *clk_list, > unsigned int nr_clk); > -extern void __init samsung_clk_register_fixed_factor( > +void samsung_clk_register_fixed_factor( > struct samsung_clk_provider *ctx, > const struct samsung_fixed_factor_clock *list, > unsigned int nr_clk); > -extern void __init samsung_clk_register_mux(struct samsung_clk_provider *ctx, > +void samsung_clk_register_mux(struct samsung_clk_provider *ctx, > const struct samsung_mux_clock *clk_list, > unsigned int nr_clk); > -extern void __init samsung_clk_register_div(struct samsung_clk_provider *ctx, > +void samsung_clk_register_div(struct samsung_clk_provider *ctx, > const struct samsung_div_clock *clk_list, > unsigned int nr_clk); > -extern void __init samsung_clk_register_gate(struct samsung_clk_provider *ctx, > +void samsung_clk_register_gate(struct samsung_clk_provider *ctx, > const struct samsung_gate_clock *clk_list, > unsigned int nr_clk); > -extern void __init samsung_clk_register_pll(struct samsung_clk_provider *ctx, > +void samsung_clk_register_pll(struct samsung_clk_provider *ctx, > const struct samsung_pll_clock *pll_list, > unsigned int nr_clk, void __iomem *base); > -extern void samsung_clk_register_cpu(struct samsung_clk_provider *ctx, > +void samsung_clk_register_cpu(struct samsung_clk_provider *ctx, > const struct samsung_cpu_clock *list, unsigned int nr_clk); > > -extern struct samsung_clk_provider __init *samsung_cmu_register_one( > +struct samsung_clk_provider *samsung_cmu_register_one( > struct device_node *, > const struct samsung_cmu_info *); > > #ifdef CONFIG_PM_SLEEP > -extern void samsung_clk_extended_sleep_init(void __iomem *reg_base, > +void samsung_clk_extended_sleep_init(void __iomem *reg_base, > const unsigned long *rdump, > unsigned long nr_rdump, > const struct samsung_clk_reg_dump *rsuspend, > @@ -397,13 +397,13 @@ static inline void samsung_clk_extended_sleep_init(void __iomem *reg_base, > #define samsung_clk_sleep_init(reg_base, rdump, nr_rdump) \ > samsung_clk_extended_sleep_init(reg_base, rdump, nr_rdump, NULL, 0) > > -extern void samsung_clk_save(void __iomem *base, > +void samsung_clk_save(void __iomem *base, > struct samsung_clk_reg_dump *rd, > unsigned int num_regs); In such case, let's also drop the extern from Will's patch? Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Best regards, Krzysztof
On 15.10.2021 17:16, Krzysztof Kozlowski wrote: > On 15/10/2021 17:14, Sylwester Nawrocki wrote: >> Remove useless __init atrribute and unneeded extern qualifier in function >> declarations in header files. >> >> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> >> --- >> drivers/clk/samsung/clk-cpu.h | 2 +- >> drivers/clk/samsung/clk.h | 34 +++++++++++++++++----------------- [..] >> -extern void __init samsung_clk_register_pll(struct samsung_clk_provider *ctx, >> +void samsung_clk_register_pll(struct samsung_clk_provider *ctx, >> const struct samsung_pll_clock *pll_list, >> unsigned int nr_clk, void __iomem *base); >> -extern void samsung_clk_register_cpu(struct samsung_clk_provider *ctx, >> +void samsung_clk_register_cpu(struct samsung_clk_provider *ctx, >> const struct samsung_cpu_clock *list, unsigned int nr_clk); [...] > In such case, let's also drop the extern from Will's patch? Yeah, I have already applied Will's patches and that patch also removes the one newly introduced extern.
Quoting Sylwester Nawrocki (2021-10-15 08:14:25) > Remove useless __init atrribute and unneeded extern qualifier in function I prefer extern even if it is verbose but it doesn't really matter. > declarations in header files. > > Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> > --- Reviewed-by: Stephen Boyd <sboyd@kernel.org>
diff --git a/drivers/clk/samsung/clk-cpu.h b/drivers/clk/samsung/clk-cpu.h index af74686db9ef..fd885d2bf74c 100644 --- a/drivers/clk/samsung/clk-cpu.h +++ b/drivers/clk/samsung/clk-cpu.h @@ -62,7 +62,7 @@ struct exynos_cpuclk { #define CLK_CPU_HAS_E5433_REGS_LAYOUT (1 << 2) }; -int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx, +int exynos_register_cpu_clock(struct samsung_clk_provider *ctx, unsigned int lookup_id, const char *name, const struct clk_hw *parent, const struct clk_hw *alt_parent, unsigned long offset, diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h index b23776d540eb..b46e83a2581f 100644 --- a/drivers/clk/samsung/clk.h +++ b/drivers/clk/samsung/clk.h @@ -337,52 +337,52 @@ struct samsung_cmu_info { const char *clk_name; }; -extern struct samsung_clk_provider *__init samsung_clk_init( +struct samsung_clk_provider * samsung_clk_init( struct device_node *np, void __iomem *base, unsigned long nr_clks); -extern void __init samsung_clk_of_add_provider(struct device_node *np, +void samsung_clk_of_add_provider(struct device_node *np, struct samsung_clk_provider *ctx); -extern void __init samsung_clk_of_register_fixed_ext( +void samsung_clk_of_register_fixed_ext( struct samsung_clk_provider *ctx, struct samsung_fixed_rate_clock *fixed_rate_clk, unsigned int nr_fixed_rate_clk, const struct of_device_id *clk_matches); -extern void samsung_clk_add_lookup(struct samsung_clk_provider *ctx, +void samsung_clk_add_lookup(struct samsung_clk_provider *ctx, struct clk_hw *clk_hw, unsigned int id); -extern void __init samsung_clk_register_alias(struct samsung_clk_provider *ctx, +void samsung_clk_register_alias(struct samsung_clk_provider *ctx, const struct samsung_clock_alias *list, unsigned int nr_clk); -extern void __init samsung_clk_register_fixed_rate( +void samsung_clk_register_fixed_rate( struct samsung_clk_provider *ctx, const struct samsung_fixed_rate_clock *clk_list, unsigned int nr_clk); -extern void __init samsung_clk_register_fixed_factor( +void samsung_clk_register_fixed_factor( struct samsung_clk_provider *ctx, const struct samsung_fixed_factor_clock *list, unsigned int nr_clk); -extern void __init samsung_clk_register_mux(struct samsung_clk_provider *ctx, +void samsung_clk_register_mux(struct samsung_clk_provider *ctx, const struct samsung_mux_clock *clk_list, unsigned int nr_clk); -extern void __init samsung_clk_register_div(struct samsung_clk_provider *ctx, +void samsung_clk_register_div(struct samsung_clk_provider *ctx, const struct samsung_div_clock *clk_list, unsigned int nr_clk); -extern void __init samsung_clk_register_gate(struct samsung_clk_provider *ctx, +void samsung_clk_register_gate(struct samsung_clk_provider *ctx, const struct samsung_gate_clock *clk_list, unsigned int nr_clk); -extern void __init samsung_clk_register_pll(struct samsung_clk_provider *ctx, +void samsung_clk_register_pll(struct samsung_clk_provider *ctx, const struct samsung_pll_clock *pll_list, unsigned int nr_clk, void __iomem *base); -extern void samsung_clk_register_cpu(struct samsung_clk_provider *ctx, +void samsung_clk_register_cpu(struct samsung_clk_provider *ctx, const struct samsung_cpu_clock *list, unsigned int nr_clk); -extern struct samsung_clk_provider __init *samsung_cmu_register_one( +struct samsung_clk_provider *samsung_cmu_register_one( struct device_node *, const struct samsung_cmu_info *); #ifdef CONFIG_PM_SLEEP -extern void samsung_clk_extended_sleep_init(void __iomem *reg_base, +void samsung_clk_extended_sleep_init(void __iomem *reg_base, const unsigned long *rdump, unsigned long nr_rdump, const struct samsung_clk_reg_dump *rsuspend, @@ -397,13 +397,13 @@ static inline void samsung_clk_extended_sleep_init(void __iomem *reg_base, #define samsung_clk_sleep_init(reg_base, rdump, nr_rdump) \ samsung_clk_extended_sleep_init(reg_base, rdump, nr_rdump, NULL, 0) -extern void samsung_clk_save(void __iomem *base, +void samsung_clk_save(void __iomem *base, struct samsung_clk_reg_dump *rd, unsigned int num_regs); -extern void samsung_clk_restore(void __iomem *base, +void samsung_clk_restore(void __iomem *base, const struct samsung_clk_reg_dump *rd, unsigned int num_regs); -extern struct samsung_clk_reg_dump *samsung_clk_alloc_reg_dump( +struct samsung_clk_reg_dump *samsung_clk_alloc_reg_dump( const unsigned long *rdump, unsigned long nr_rdump);
Remove useless __init atrribute and unneeded extern qualifier in function declarations in header files. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> --- drivers/clk/samsung/clk-cpu.h | 2 +- drivers/clk/samsung/clk.h | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-)