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
This commit is contained in:
parent
6ea4383b92
commit
7b987887f9
|
@ -333,11 +333,9 @@ static int __g450_setclk(struct matrox_fb_info *minfo, unsigned int fout,
|
||||||
unsigned int *deltaarray)
|
unsigned int *deltaarray)
|
||||||
{
|
{
|
||||||
unsigned int mnpcount;
|
unsigned int mnpcount;
|
||||||
unsigned int pixel_vco;
|
|
||||||
const struct matrox_pll_limits* pi;
|
const struct matrox_pll_limits* pi;
|
||||||
struct matrox_pll_cache* ci;
|
struct matrox_pll_cache* ci;
|
||||||
|
|
||||||
pixel_vco = 0;
|
|
||||||
switch (pll) {
|
switch (pll) {
|
||||||
case M_PIXEL_PLL_A:
|
case M_PIXEL_PLL_A:
|
||||||
case M_PIXEL_PLL_B:
|
case M_PIXEL_PLL_B:
|
||||||
|
@ -420,7 +418,6 @@ static int __g450_setclk(struct matrox_fb_info *minfo, unsigned int fout,
|
||||||
|
|
||||||
mnp = matroxfb_DAC_in(minfo, M1064_XPIXPLLCM) << 16;
|
mnp = matroxfb_DAC_in(minfo, M1064_XPIXPLLCM) << 16;
|
||||||
mnp |= matroxfb_DAC_in(minfo, M1064_XPIXPLLCN) << 8;
|
mnp |= matroxfb_DAC_in(minfo, M1064_XPIXPLLCN) << 8;
|
||||||
pixel_vco = g450_mnp2vco(minfo, mnp);
|
|
||||||
matroxfb_DAC_unlock_irqrestore(flags);
|
matroxfb_DAC_unlock_irqrestore(flags);
|
||||||
}
|
}
|
||||||
pi = &minfo->limits.video;
|
pi = &minfo->limits.video;
|
||||||
|
@ -441,25 +438,6 @@ static int __g450_setclk(struct matrox_fb_info *minfo, unsigned int fout,
|
||||||
unsigned int delta;
|
unsigned int delta;
|
||||||
|
|
||||||
vco = g450_mnp2vco(minfo, mnp);
|
vco = g450_mnp2vco(minfo, mnp);
|
||||||
#if 0
|
|
||||||
if (pll == M_VIDEO_PLL) {
|
|
||||||
unsigned int big, small;
|
|
||||||
|
|
||||||
if (vco < pixel_vco) {
|
|
||||||
small = vco;
|
|
||||||
big = pixel_vco;
|
|
||||||
} else {
|
|
||||||
small = pixel_vco;
|
|
||||||
big = vco;
|
|
||||||
}
|
|
||||||
while (big > small) {
|
|
||||||
big >>= 1;
|
|
||||||
}
|
|
||||||
if (big == small) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
delta = pll_freq_delta(fout, g450_vco2f(mnp, vco));
|
delta = pll_freq_delta(fout, g450_vco2f(mnp, vco));
|
||||||
for (idx = mnpcount; idx > 0; idx--) {
|
for (idx = mnpcount; idx > 0; idx--) {
|
||||||
/* == is important; due to nextpll algorithm we get
|
/* == is important; due to nextpll algorithm we get
|
||||||
|
|
Loading…
Reference in a new issue