diff options
author | Zhangfei Gao <zhangfei.gao@linaro.org> | 2014-03-10 11:33:20 +0800 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2014-03-20 19:05:39 -0700 |
commit | c115b13b85af69df0314556213db0b73cd8ea7e6 (patch) | |
tree | ebb993b7d1d4e42095452f79f266f44b4406f335 /drivers | |
parent | a665962e8f4484647e7a19b4d6329d42ed8bc804 (diff) | |
download | linux-c115b13b85af69df0314556213db0b73cd8ea7e6.tar.bz2 |
clk: hisilicon: fix warning from smatch
drivers/clk/hisilicon/clk-hi3620.c:338
mmc_clk_delay() warn: always true condition '(para >= 0) => (0-u32max >= 0)'
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clk/hisilicon/clk-hi3620.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/clk/hisilicon/clk-hi3620.c b/drivers/clk/hisilicon/clk-hi3620.c index 233eba22187a..339945d2503b 100644 --- a/drivers/clk/hisilicon/clk-hi3620.c +++ b/drivers/clk/hisilicon/clk-hi3620.c @@ -326,15 +326,14 @@ static u32 mmc_clk_delay(u32 val, u32 para, u32 off, u32 len) { u32 i; - if (para >= 0) { - for (i = 0; i < len; i++) { - if (para % 2) - val |= 1 << (off + i); - else - val &= ~(1 << (off + i)); - para = para >> 1; - } + for (i = 0; i < len; i++) { + if (para % 2) + val |= 1 << (off + i); + else + val &= ~(1 << (off + i)); + para = para >> 1; } + return val; } |