linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: yu kuai <yukuai3@huawei.com>
Cc: kbuild-all@lists.01.org, b.zolnierkie@samsung.com,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, yukuai3@huawei.com,
	zhengbin13@huawei.com, yi.zhang@huawei.com
Subject: Re: [PATCH] video: remove set but not used variable 'mach64RefFreq'
Date: Mon, 20 Jan 2020 14:15:07 +0800	[thread overview]
Message-ID: <202001201425.ttqGO8xJ%lkp@intel.com> (raw)
In-Reply-To: <20200119122038.13425-1-yukuai3@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 9381 bytes --]

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@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@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36893 bytes --]

      reply	other threads:[~2020-01-20  6:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-19 12:20 [PATCH] video: remove set but not used variable 'mach64RefFreq' yu kuai
2020-01-20  6:15 ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202001201425.ttqGO8xJ%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.com \
    --cc=zhengbin13@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).