[PATCH] video: remove set but not used variable 'mach64RefFreq'

kbuild test robot lkp at intel.com
Mon Jan 20 06:15:07 UTC 2020


Hi yu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tegra-drm/drm/tegra/for-next]
[also build test ERROR on linux/master linus/master v5.5-rc7 next-20200117]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/yu-kuai/video-remove-set-but-not-used-variable-mach64RefFreq/20200119-203016
base:   git://anongit.freedesktop.org/tegra/linux.git drm/tegra/for-next
config: x86_64-randconfig-s1-20200120 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   drivers/video/fbdev/aty/mach64_gx.c: In function 'aty_var_to_pll_8398':
   drivers/video/fbdev/aty/mach64_gx.c:625:2: error: 'mach64MinFreq' undeclared (first use in this function)
     mach64MinFreq = MIN_FREQ_2595;
     ^~~~~~~~~~~~~
   drivers/video/fbdev/aty/mach64_gx.c:625:2: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/video/fbdev/aty/mach64_gx.c:626:2: error: 'mach64MaxFreq' undeclared (first use in this function)
     mach64MaxFreq = MAX_FREQ_2595;
     ^~~~~~~~~~~~~

vim +/mach64MaxFreq +626 drivers/video/fbdev/aty/mach64_gx.c

^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  607  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  608  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  609      /*
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  610       *  Chrontel 8398 Clock Chip
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  611       */
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  612  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  613  static int aty_var_to_pll_8398(const struct fb_info *info, u32 vclk_per,
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  614  			       u32 bpp, union aty_pll *pll)
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  615  {
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  616  	u32 tempA, tempB, fOut, longMHz100, diff, preDiff;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  617  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  618  	u32 mhz100;		/* in 0.01 MHz */
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  619  	u32 program_bits;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  620  	/* u32 post_divider; */
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  621  	u16 m, n, k = 0, save_m, save_n, twoToKth;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  622  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  623  	/* Calculate the programming word */
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  624  	mhz100 = 100000000 / vclk_per;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  625  	mach64MinFreq = MIN_FREQ_2595;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16 @626  	mach64MaxFreq = MAX_FREQ_2595;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  627  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  628  	save_m = 0;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  629  	save_n = 0;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  630  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  631  	/* Calculate program word */
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  632  	if (mhz100 == 0)
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  633  		program_bits = 0xE0;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  634  	else {
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  635  		if (mhz100 < mach64MinFreq)
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  636  			mhz100 = mach64MinFreq;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  637  		if (mhz100 > mach64MaxFreq)
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  638  			mhz100 = mach64MaxFreq;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  639  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  640  		longMHz100 = mhz100 * 256 / 100;	/* 8 bit scale this */
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  641  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  642  		while (mhz100 < (mach64MinFreq << 3)) {
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  643  			mhz100 <<= 1;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  644  			k++;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  645  		}
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  646  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  647  		twoToKth = 1 << k;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  648  		diff = 0;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  649  		preDiff = 0xFFFFFFFF;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  650  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  651  		for (m = MIN_M; m <= MAX_M; m++) {
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  652  			for (n = MIN_N; n <= MAX_N; n++) {
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  653  				tempA = 938356;		/* 14.31818 * 65536 */
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  654  				tempA *= (n + 8);	/* 43..256 */
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  655  				tempB = twoToKth * 256;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  656  				tempB *= (m + 2);	/* 4..32 */
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  657  				fOut = tempA / tempB;	/* 8 bit scale */
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  658  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  659  				if (longMHz100 > fOut)
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  660  					diff = longMHz100 - fOut;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  661  				else
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  662  					diff = fOut - longMHz100;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  663  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  664  				if (diff < preDiff) {
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  665  					save_m = m;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  666  					save_n = n;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  667  					preDiff = diff;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  668  				}
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  669  			}
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  670  		}
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  671  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  672  		program_bits = (k << 6) + (save_m) + (save_n << 8);
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  673  	}
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  674  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  675  	pll->ics2595.program_bits = program_bits;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  676  	pll->ics2595.locationAddr = 0;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  677  	pll->ics2595.post_divider = 0;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  678  	pll->ics2595.period_in_ps = vclk_per;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  679  
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  680  	return 0;
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  681  }
^1da177e4c3f41 drivers/video/aty/mach64_gx.c Linus Torvalds 2005-04-16  682  

:::::: The code at line 626 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds at ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds at ppc970.osdl.org>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 36893 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200120/997a842e/attachment-0001.gz>


More information about the dri-devel mailing list