Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: fbdev: matroxfb: remove dead code and set but not used variable

Fix the following gcc warning:

drivers/video/fbdev/matrox/g450_pll.c:336:15: warning: variable
‘pixel_vco’ set but not used [-Wunused-but-set-variable]
unsigned int pixel_vco;
^~~~~~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200403021609.20968-1-yanaijie@huawei.com

authored by

Jason Yan and committed by
Sam Ravnborg
7b987887 6ea4383b

-22
-22
drivers/video/fbdev/matrox/g450_pll.c
··· 333 333 unsigned int *deltaarray) 334 334 { 335 335 unsigned int mnpcount; 336 - unsigned int pixel_vco; 337 336 const struct matrox_pll_limits* pi; 338 337 struct matrox_pll_cache* ci; 339 338 340 - pixel_vco = 0; 341 339 switch (pll) { 342 340 case M_PIXEL_PLL_A: 343 341 case M_PIXEL_PLL_B: ··· 418 420 419 421 mnp = matroxfb_DAC_in(minfo, M1064_XPIXPLLCM) << 16; 420 422 mnp |= matroxfb_DAC_in(minfo, M1064_XPIXPLLCN) << 8; 421 - pixel_vco = g450_mnp2vco(minfo, mnp); 422 423 matroxfb_DAC_unlock_irqrestore(flags); 423 424 } 424 425 pi = &minfo->limits.video; ··· 438 441 unsigned int delta; 439 442 440 443 vco = g450_mnp2vco(minfo, mnp); 441 - #if 0 442 - if (pll == M_VIDEO_PLL) { 443 - unsigned int big, small; 444 - 445 - if (vco < pixel_vco) { 446 - small = vco; 447 - big = pixel_vco; 448 - } else { 449 - small = pixel_vco; 450 - big = vco; 451 - } 452 - while (big > small) { 453 - big >>= 1; 454 - } 455 - if (big == small) { 456 - continue; 457 - } 458 - } 459 - #endif 460 444 delta = pll_freq_delta(fout, g450_vco2f(mnp, vco)); 461 445 for (idx = mnpcount; idx > 0; idx--) { 462 446 /* == is important; due to nextpll algorithm we get