diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-07-17 05:39:58 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-17 16:23:19 -0400 |
commit | a6343afb6e16b65b9f0b264f94f8207212e7e3ae (patch) | |
tree | 038520431715be0dab295883ba994b7854202c71 /drivers/video/matrox/matroxfb_maven.c | |
parent | b1734d2388cc45ecdec58615e35955d0d402f938 (diff) |
drivers/*: mark variables with uninitialized_var()
Mark variables in drivers/* with uninitialized_var() if such a warning
appears, and analysis proves that the var is initialized properly on all
paths it is used.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/video/matrox/matroxfb_maven.c')
-rw-r--r-- | drivers/video/matrox/matroxfb_maven.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c index 5d29a26b8cdf..de0d755f9019 100644 --- a/drivers/video/matrox/matroxfb_maven.c +++ b/drivers/video/matrox/matroxfb_maven.c | |||
@@ -273,8 +273,11 @@ static int matroxfb_PLL_mavenclock(const struct matrox_pll_features2* pll, | |||
273 | } | 273 | } |
274 | } | 274 | } |
275 | } | 275 | } |
276 | |||
277 | /* if h2/post/in/feed have not been assigned, return zero (error) */ | ||
276 | if (besth2 < 2) | 278 | if (besth2 < 2) |
277 | return 0; | 279 | return 0; |
280 | |||
278 | dprintk(KERN_ERR "clk: %02X %02X %02X %d %d\n", *in, *feed, *post, fxtal, fwant); | 281 | dprintk(KERN_ERR "clk: %02X %02X %02X %d %d\n", *in, *feed, *post, fxtal, fwant); |
279 | return fxtal * (*feed) / (*in) * ctl->den; | 282 | return fxtal * (*feed) / (*in) * ctl->den; |
280 | } | 283 | } |
@@ -284,7 +287,7 @@ static unsigned int matroxfb_mavenclock(const struct matrox_pll_ctl* ctl, | |||
284 | unsigned int* in, unsigned int* feed, unsigned int* post, | 287 | unsigned int* in, unsigned int* feed, unsigned int* post, |
285 | unsigned int* htotal2) { | 288 | unsigned int* htotal2) { |
286 | unsigned int fvco; | 289 | unsigned int fvco; |
287 | unsigned int p; | 290 | unsigned int uninitialized_var(p); |
288 | 291 | ||
289 | fvco = matroxfb_PLL_mavenclock(&maven1000_pll, ctl, htotal, vtotal, in, feed, &p, htotal2); | 292 | fvco = matroxfb_PLL_mavenclock(&maven1000_pll, ctl, htotal, vtotal, in, feed, &p, htotal2); |
290 | if (!fvco) | 293 | if (!fvco) |
@@ -715,7 +718,9 @@ static int maven_find_exact_clocks(unsigned int ht, unsigned int vt, | |||
715 | m->regs[0x82] = 0x81; | 718 | m->regs[0x82] = 0x81; |
716 | 719 | ||
717 | for (x = 0; x < 8; x++) { | 720 | for (x = 0; x < 8; x++) { |
718 | unsigned int a, b, c, h2; | 721 | unsigned int c; |
722 | unsigned int uninitialized_var(a), uninitialized_var(b), | ||
723 | uninitialized_var(h2); | ||
719 | unsigned int h = ht + 2 + x; | 724 | unsigned int h = ht + 2 + x; |
720 | 725 | ||
721 | if (!matroxfb_mavenclock((m->mode == MATROXFB_OUTPUT_MODE_PAL) ? &maven_PAL : &maven_NTSC, h, vt, &a, &b, &c, &h2)) { | 726 | if (!matroxfb_mavenclock((m->mode == MATROXFB_OUTPUT_MODE_PAL) ? &maven_PAL : &maven_NTSC, h, vt, &a, &b, &c, &h2)) { |