Skip to contentSkip to conversation

clk: ls1x: Update relationship among all clocks

bug report Dan Carpenter 1 participant 1 message Jul 13, 2016 Common clk

lore
Share & tools
lore
#0 lore raw

Hello Kelvin Cheung,

The patch 3526f74fa925: "clk: ls1x: Update relationship among all clocks" from Oct 10, 2014, leads to the following static checker warning:

	drivers/clk/clk-ls1x.c:38 ls1x_pll_recalc_rate()
	warn: mask and shift to zero

drivers/clk/clk-ls1x.c

    32  static unsigned long ls1x_pll_recalc_rate(struct clk_hw *hw,
    33                                            unsigned long parent_rate)
    34  {
    35          u32 pll, rate;
    36  
    37          pll = __raw_readl(LS1X_CLK_PLL_FREQ);
    38          rate = 12 + (pll & 0x3f) + (((pll >> 8) & 0x3ff) >> 10);

0x3ff >> 10 is zero. It's not clear to me what is intended.

    39          rate *= OSC;
    40          rate >>= 1;
    41  
    42          return rate;
    43  }

regards,
dan carpenter