Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Arnd Bergmann and committed by
Stephen Boyd
4acfeecd 0cd830ac

+4 -6
+4 -6
drivers/clk/ti/dpll.c
··· 34 34 .save_context = &omap3_core_dpll_save_context, 35 35 .restore_context = &omap3_core_dpll_restore_context, 36 36 }; 37 - #else 38 - static const struct clk_ops dpll_m4xen_ck_ops = {}; 39 37 #endif 40 38 41 39 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) || \ ··· 93 95 .recalc_rate = &omap3_dpll_recalc, 94 96 .round_rate = &omap2_dpll_round_rate, 95 97 }; 96 - #else 97 - static const struct clk_ops omap3_dpll_core_ck_ops = {}; 98 - #endif 99 98 100 - #ifdef CONFIG_ARCH_OMAP3 101 99 static const struct clk_ops omap3_dpll_ck_ops = { 102 100 .enable = &omap3_noncore_dpll_enable, 103 101 .disable = &omap3_noncore_dpll_disable, ··· 131 137 }; 132 138 #endif 133 139 140 + #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \ 141 + defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM33XX) || \ 142 + defined(CONFIG_SOC_AM43XX) 134 143 static const struct clk_ops dpll_x2_ck_ops = { 135 144 .recalc_rate = &omap3_clkoutx2_recalc, 136 145 }; 146 + #endif 137 147 138 148 /** 139 149 * _register_dpll - low level registration of a DPLL clock