提交 6257ffac 编写于 作者: A Antonino A. Daplas 提交者: Linus Torvalds

[PATCH] imsttfb: Remove dead code

clk_p is always 0.

Coverity Bug 67
Signed-off-by: NAntonino Daplas <adaplas@pol.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 eba87e8e
...@@ -440,9 +440,9 @@ getclkMHz(struct imstt_par *par) ...@@ -440,9 +440,9 @@ getclkMHz(struct imstt_par *par)
static void static void
setclkMHz(struct imstt_par *par, __u32 MHz) setclkMHz(struct imstt_par *par, __u32 MHz)
{ {
__u32 clk_m, clk_n, clk_p, x, stage, spilled; __u32 clk_m, clk_n, x, stage, spilled;
clk_m = clk_n = clk_p = 0; clk_m = clk_n = 0;
stage = spilled = 0; stage = spilled = 0;
for (;;) { for (;;) {
switch (stage) { switch (stage) {
...@@ -453,7 +453,7 @@ setclkMHz(struct imstt_par *par, __u32 MHz) ...@@ -453,7 +453,7 @@ setclkMHz(struct imstt_par *par, __u32 MHz)
clk_n++; clk_n++;
break; break;
} }
x = 20 * (clk_m + 1) / ((clk_n + 1) * (clk_p ? 2 * clk_p : 1)); x = 20 * (clk_m + 1) / (clk_n + 1);
if (x == MHz) if (x == MHz)
break; break;
if (x > MHz) { if (x > MHz) {
...@@ -466,7 +466,7 @@ setclkMHz(struct imstt_par *par, __u32 MHz) ...@@ -466,7 +466,7 @@ setclkMHz(struct imstt_par *par, __u32 MHz)
par->init.pclk_m = clk_m; par->init.pclk_m = clk_m;
par->init.pclk_n = clk_n; par->init.pclk_n = clk_n;
par->init.pclk_p = clk_p; par->init.pclk_p = 0;
} }
static struct imstt_regvals * static struct imstt_regvals *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册