linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* clk: hisilicon: add hi3620_mmc_clks
       [not found] <20140303121335.GA10177@elgon.mountain>
@ 2014-03-10  3:36 ` zhangfei
  0 siblings, 0 replies; only message in thread
From: zhangfei @ 2014-03-10  3:36 UTC (permalink / raw)
  To: linux-arm-kernel


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
>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-10  3:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20140303121335.GA10177@elgon.mountain>
2014-03-10  3:36 ` clk: hisilicon: add hi3620_mmc_clks zhangfei

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).