Thread (1 message) 1 message, 1 author, 2014-03-10

clk: hisilicon: add hi3620_mmc_clks

From: zhangfei.gao@linaro.org (zhangfei)
Date: 2014-03-10 03:36:58

Thanks Dan

Sorry, not check with smatch, only check with checkpatch.pl & sparse.
Will take care next time.

On 03/03/2014 08:13 PM, Dan Carpenter wrote:
Hello Zhangfei Gao,

The patch 62ac983b6141: "clk: hisilicon: add hi3620_mmc_clks" from
Jan 13, 2014, leads to the following static checker warning:

	drivers/clk/hisilicon/clk-hi3620.c:338 mmc_clk_delay()
	warn: always true condition '(para >= 0) => (0-u32max >= 0)'

drivers/clk/hisilicon/clk-hi3620.c
    334  static u32 mmc_clk_delay(u32 val, u32 para, u32 off, u32 len)
    335  {
    336          u32 i;
    337
    338          if (para >= 0) {
                     ^^^^^^^^^
Wat?

    339                  for (i = 0; i < len; i++) {
    340                          if (para % 2)
    341                                  val |= 1 << (off + i);
    342                          else
    343                                  val &= ~(1 << (off + i));
    344                          para = para >> 1;
    345                  }
    346          }
    347          return val;
    348  }

regards,
dan carpenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help