Skip to contentSkip to conversation

clk: bm1800: Remove set but not used variable 'fref'

PATCH Applied YueHaibing 2 participants 2 messages Nov 29, 2019 – Dec 24, 2019

Subsystems (3)
lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 1/1 clk: bm1800: Remove set but not used variable 'fref'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/clk/clk-bm1880.c: In function 'bm1880_pll_rate_calc':
drivers/clk/clk-bm1880.c:477:13: warning:
variable 'fref' set but not used [-Wunused-but-set-variable]

It is never used, so remove it.

---
 drivers/clk/clk-bm1880.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/clk/clk-bm1880.c +1 -2
index 4cd175afce9b..e6d6599d310a 100644
@@ -474,11 +474,10 @@ static struct bm1880_composite_clock bm1880_composite_clks[] = {
 static unsigned long bm1880_pll_rate_calc(u32 regval, unsigned long parent_rate)
 {
 	u64 numerator;
-	u32 fbdiv, fref, refdiv;
+	u32 fbdiv, refdiv;
 	u32 postdiv1, postdiv2, denominator;
 
 	fbdiv = (regval >> 16) & 0xfff;
-	fref = parent_rate;
 	refdiv = regval & 0x1f;
 	postdiv1 = (regval >> 8) & 0x7;
 	postdiv2 = (regval >> 12) & 0x7;
maintainer Applied
#1 lore raw

Quoting YueHaibing (2019-11-28 19:35:34)

Quoted 11 lines

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/clk/clk-bm1880.c: In function 'bm1880_pll_rate_calc':
drivers/clk/clk-bm1880.c:477:13: warning:
variable 'fref' set but not used [-Wunused-but-set-variable]

It is never used, so remove it.

---

Applied to clk-next