* [PATCH -next] clk: ingenic: Remove set but not used variable 'enable'
@ 2019-02-26 1:57 YueHaibing
2019-02-26 17:41 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-02-26 1:57 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Paul Cercueil
Cc: YueHaibing, linux-clk, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/clk/ingenic/cgu.c: In function 'ingenic_pll_recalc_rate':
drivers/clk/ingenic/cgu.c:86:15: warning:
variable 'enable' set but not used [-Wunused-but-set-variable]
It's not used after commit ab27eb4bc365 ("clk: ingenic: Add code to
enable/disable PLLs")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/clk/ingenic/cgu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/clk/ingenic/cgu.c b/drivers/clk/ingenic/cgu.c
index b40160eb3372..510b685212d3 100644
--- a/drivers/clk/ingenic/cgu.c
+++ b/drivers/clk/ingenic/cgu.c
@@ -83,7 +83,7 @@ ingenic_pll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
const struct ingenic_cgu_clk_info *clk_info;
const struct ingenic_cgu_pll_info *pll_info;
unsigned m, n, od_enc, od;
- bool bypass, enable;
+ bool bypass;
unsigned long flags;
u32 ctl;
@@ -103,7 +103,6 @@ ingenic_pll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
od_enc &= GENMASK(pll_info->od_bits - 1, 0);
bypass = !pll_info->no_bypass_bit &&
!!(ctl & BIT(pll_info->bypass_bit));
- enable = !!(ctl & BIT(pll_info->enable_bit));
if (bypass)
return parent_rate;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] clk: ingenic: Remove set but not used variable 'enable'
2019-02-26 1:57 [PATCH -next] clk: ingenic: Remove set but not used variable 'enable' YueHaibing
@ 2019-02-26 17:41 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2019-02-26 17:41 UTC (permalink / raw)
To: Michael Turquette, Paul Cercueil, YueHaibing
Cc: YueHaibing, linux-clk, kernel-janitors
Quoting YueHaibing (2019-02-25 17:57:32)
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/clk/ingenic/cgu.c: In function 'ingenic_pll_recalc_rate':
> drivers/clk/ingenic/cgu.c:86:15: warning:
> variable 'enable' set but not used [-Wunused-but-set-variable]
>
> It's not used after commit ab27eb4bc365 ("clk: ingenic: Add code to
> enable/disable PLLs")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-26 17:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-26 1:57 [PATCH -next] clk: ingenic: Remove set but not used variable 'enable' YueHaibing
2019-02-26 17:41 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).