Skip to content

Commit 4acfeec

Browse files
arndbbebarino
authored andcommitted
clk: ti: dpll: fix incorrect #ifdef checks
Building with W=1 shows warnings about unused const variables like this one: drivers/clk/ti/dpll.c:99:29: error: unused variable 'omap3_dpll_core_ck_ops' [-Werror,-Wunused-const-variable] static const struct clk_ops omap3_dpll_core_ck_ops = {}; The problem is that the #ifdef checks for some of the structures in this file have gone out of sync with the code referencing them. Update these to match the current usage. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20240403080702.3509288-12-arnd@kernel.org Reviewed-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 0cd830a commit 4acfeec

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/clk/ti/dpll.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ static const struct clk_ops dpll_m4xen_ck_ops = {
3434
.save_context = &omap3_core_dpll_save_context,
3535
.restore_context = &omap3_core_dpll_restore_context,
3636
};
37-
#else
38-
static const struct clk_ops dpll_m4xen_ck_ops = {};
3937
#endif
4038

4139
#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) || \
@@ -95,11 +93,7 @@ static const struct clk_ops omap3_dpll_core_ck_ops = {
9593
.recalc_rate = &omap3_dpll_recalc,
9694
.round_rate = &omap2_dpll_round_rate,
9795
};
98-
#else
99-
static const struct clk_ops omap3_dpll_core_ck_ops = {};
100-
#endif
10196

102-
#ifdef CONFIG_ARCH_OMAP3
10397
static const struct clk_ops omap3_dpll_ck_ops = {
10498
.enable = &omap3_noncore_dpll_enable,
10599
.disable = &omap3_noncore_dpll_disable,
@@ -137,9 +131,13 @@ static const struct clk_ops omap3_dpll_per_ck_ops = {
137131
};
138132
#endif
139133

134+
#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
135+
defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM33XX) || \
136+
defined(CONFIG_SOC_AM43XX)
140137
static const struct clk_ops dpll_x2_ck_ops = {
141138
.recalc_rate = &omap3_clkoutx2_recalc,
142139
};
140+
#endif
143141

144142
/**
145143
* _register_dpll - low level registration of a DPLL clock

0 commit comments

Comments
 (0)