linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: zhangfei.gao@linaro.org (zhangfei)
To: linux-arm-kernel@lists.infradead.org
Subject: clk: hisilicon: add hi3620_mmc_clks
Date: Mon, 10 Mar 2014 11:36:58 +0800	[thread overview]
Message-ID: <531D335A.5060309@linaro.org> (raw)
In-Reply-To: <20140303121335.GA10177@elgon.mountain>


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
>

           reply	other threads:[~2014-03-10  3:36 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20140303121335.GA10177@elgon.mountain>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=531D335A.5060309@linaro.org \
    --to=zhangfei.gao@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).