* [PATCH] video: remove set but not used variable 'ulScaleRight'
@ 2020-01-19 12:19 ` yu kuai
2020-01-19 12:20 ` [PATCH] video: remove set but not used variable 'mach64RefFreq' yu kuai
2020-03-02 15:42 ` [PATCH] video: remove set but not used variable 'ulScaleRight' Bartlomiej Zolnierkiewicz
0 siblings, 2 replies; 4+ messages in thread
From: yu kuai @ 2020-01-19 12:19 UTC (permalink / raw)
To: b.zolnierkie
Cc: linux-fbdev, yi.zhang, linux-kernel, dri-devel, zhengbin13,
yukuai3
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/video/fbdev/kyro/STG4000OverlayDevice.c: In function
‘SetOverlayViewPort’:
drivers/video/fbdev/kyro/STG4000OverlayDevice.c:334:19: warning:
variable ‘ulScaleRight’ set but not used [-Wunused-but-set-variable]
It is never used, and so can be removed.
Signed-off-by: yu kuai <yukuai3@huawei.com>
---
drivers/video/fbdev/kyro/STG4000OverlayDevice.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/kyro/STG4000OverlayDevice.c b/drivers/video/fbdev/kyro/STG4000OverlayDevice.c
index 0aeeaa10708b..9fde0e3b69ec 100644
--- a/drivers/video/fbdev/kyro/STG4000OverlayDevice.c
+++ b/drivers/video/fbdev/kyro/STG4000OverlayDevice.c
@@ -331,7 +331,7 @@ int SetOverlayViewPort(volatile STG4000REG __iomem *pSTGReg,
u32 ulScale;
u32 ulLeft, ulRight;
u32 ulSrcLeft, ulSrcRight;
- u32 ulScaleLeft, ulScaleRight;
+ u32 ulScaleLeft;
u32 ulhDecim;
u32 ulsVal;
u32 ulVertDecFactor;
@@ -470,7 +470,6 @@ int SetOverlayViewPort(volatile STG4000REG __iomem *pSTGReg,
* round down the pixel pos to the nearest 8 pixels.
*/
ulScaleLeft = ulSrcLeft;
- ulScaleRight = ulSrcRight;
/* shift fxscale until it is in the range of the scaler */
ulhDecim = 0;
--
2.17.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] video: remove set but not used variable 'mach64RefFreq'
2020-01-19 12:19 ` [PATCH] video: remove set but not used variable 'ulScaleRight' yu kuai
@ 2020-01-19 12:20 ` yu kuai
2020-01-20 6:15 ` kbuild test robot
2020-03-02 15:42 ` [PATCH] video: remove set but not used variable 'ulScaleRight' Bartlomiej Zolnierkiewicz
1 sibling, 1 reply; 4+ messages in thread
From: yu kuai @ 2020-01-19 12:20 UTC (permalink / raw)
To: b.zolnierkie
Cc: linux-fbdev, yi.zhang, linux-kernel, dri-devel, zhengbin13,
yukuai3
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/video/fbdev/aty/mach64_gx.c: In function ‘aty_var_to_pll_8398’:
drivers/video/fbdev/aty/mach64_gx.c:621:36: warning: variable
‘mach64RefFreq’ set but not used [-Wunused-but-set-variable]
It is never used, and so can be removed.
Signed-off-by: yu kuai <yukuai3@huawei.com>
---
drivers/video/fbdev/aty/mach64_gx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/video/fbdev/aty/mach64_gx.c b/drivers/video/fbdev/aty/mach64_gx.c
index 27cb65fa2ba2..1b71a5aa2baa 100644
--- a/drivers/video/fbdev/aty/mach64_gx.c
+++ b/drivers/video/fbdev/aty/mach64_gx.c
@@ -618,14 +618,12 @@ static int aty_var_to_pll_8398(const struct fb_info *info, u32 vclk_per,
u32 mhz100; /* in 0.01 MHz */
u32 program_bits;
/* u32 post_divider; */
- u32 mach64MinFreq, mach64MaxFreq, mach64RefFreq;
u16 m, n, k = 0, save_m, save_n, twoToKth;
/* Calculate the programming word */
mhz100 = 100000000 / vclk_per;
mach64MinFreq = MIN_FREQ_2595;
mach64MaxFreq = MAX_FREQ_2595;
- mach64RefFreq = REF_FREQ_2595; /* 14.32 MHz */
save_m = 0;
save_n = 0;
--
2.17.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] video: remove set but not used variable 'mach64RefFreq'
2020-01-19 12:20 ` [PATCH] video: remove set but not used variable 'mach64RefFreq' yu kuai
@ 2020-01-20 6:15 ` kbuild test robot
0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2020-01-20 6:15 UTC (permalink / raw)
To: yu kuai
Cc: linux-fbdev, kbuild-all, b.zolnierkie, yi.zhang, linux-kernel,
dri-devel, zhengbin13
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] video: remove set but not used variable 'ulScaleRight'
2020-01-19 12:19 ` [PATCH] video: remove set but not used variable 'ulScaleRight' yu kuai
2020-01-19 12:20 ` [PATCH] video: remove set but not used variable 'mach64RefFreq' yu kuai
@ 2020-03-02 15:42 ` Bartlomiej Zolnierkiewicz
1 sibling, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-03-02 15:42 UTC (permalink / raw)
To: yu kuai; +Cc: zhengbin13, linux-fbdev, linux-kernel, dri-devel, yi.zhang
On 1/19/20 1:19 PM, yu kuai wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/video/fbdev/kyro/STG4000OverlayDevice.c: In function
> ‘SetOverlayViewPort’:
> drivers/video/fbdev/kyro/STG4000OverlayDevice.c:334:19: warning:
> variable ‘ulScaleRight’ set but not used [-Wunused-but-set-variable]
>
> It is never used, and so can be removed.
>
> Signed-off-by: yu kuai <yukuai3@huawei.com>
Patch queued for v5.7, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
> ---
> drivers/video/fbdev/kyro/STG4000OverlayDevice.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/kyro/STG4000OverlayDevice.c b/drivers/video/fbdev/kyro/STG4000OverlayDevice.c
> index 0aeeaa10708b..9fde0e3b69ec 100644
> --- a/drivers/video/fbdev/kyro/STG4000OverlayDevice.c
> +++ b/drivers/video/fbdev/kyro/STG4000OverlayDevice.c
> @@ -331,7 +331,7 @@ int SetOverlayViewPort(volatile STG4000REG __iomem *pSTGReg,
> u32 ulScale;
> u32 ulLeft, ulRight;
> u32 ulSrcLeft, ulSrcRight;
> - u32 ulScaleLeft, ulScaleRight;
> + u32 ulScaleLeft;
> u32 ulhDecim;
> u32 ulsVal;
> u32 ulVertDecFactor;
> @@ -470,7 +470,6 @@ int SetOverlayViewPort(volatile STG4000REG __iomem *pSTGReg,
> * round down the pixel pos to the nearest 8 pixels.
> */
> ulScaleLeft = ulSrcLeft;
> - ulScaleRight = ulSrcRight;
>
> /* shift fxscale until it is in the range of the scaler */
> ulhDecim = 0;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-02 15:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20200119122043eucas1p2b450cd177ca0d86d268323a074c82b05@eucas1p2.samsung.com>
2020-01-19 12:19 ` [PATCH] video: remove set but not used variable 'ulScaleRight' yu kuai
2020-01-19 12:20 ` [PATCH] video: remove set but not used variable 'mach64RefFreq' yu kuai
2020-01-20 6:15 ` kbuild test robot
2020-03-02 15:42 ` [PATCH] video: remove set but not used variable 'ulScaleRight' Bartlomiej Zolnierkiewicz
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).