* [PATCH] video: fbdev: remove set but not used 'ulBestVCO'
@ 2020-08-27 13:00 ` Jason Yan
2020-08-27 13:00 ` [PATCH] video: fbdev: remove set but not used 'ulCoreClock' Jason Yan
2020-09-08 11:37 ` [PATCH] video: fbdev: remove set but not used 'ulBestVCO' Bartlomiej Zolnierkiewicz
0 siblings, 2 replies; 4+ messages in thread
From: Jason Yan @ 2020-08-27 13:00 UTC (permalink / raw)
To: b.zolnierkie, yanaijie, dri-devel, linux-fbdev, linux-kernel; +Cc: Hulk Robot
This addresses the following gcc warning with "make W=1":
drivers/video/fbdev/kyro/STG4000InitDevice.c: In function
‘ProgramClock’:
drivers/video/fbdev/kyro/STG4000InitDevice.c:123:6: warning: variable
‘ulBestVCO’ set but not used [-Wunused-but-set-variable]
123 | u32 ulBestVCO = 0, ulBestClk = 0, ulBestScore = 0;
| ^~~~~~~~~
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
drivers/video/fbdev/kyro/STG4000InitDevice.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/kyro/STG4000InitDevice.c b/drivers/video/fbdev/kyro/STG4000InitDevice.c
index edaeec2d9590..21875d3c2dc2 100644
--- a/drivers/video/fbdev/kyro/STG4000InitDevice.c
+++ b/drivers/video/fbdev/kyro/STG4000InitDevice.c
@@ -120,7 +120,7 @@ u32 ProgramClock(u32 refClock,
{
u32 R = 0, F = 0, OD = 0, ODIndex = 0;
u32 ulBestR = 0, ulBestF = 0, ulBestOD = 0;
- u32 ulBestVCO = 0, ulBestClk = 0, ulBestScore = 0;
+ u32 ulBestClk = 0, ulBestScore = 0;
u32 ulScore, ulPhaseScore, ulVcoScore;
u32 ulTmp = 0, ulVCO;
u32 ulScaleClockReq, ulMinClock, ulMaxClock;
@@ -189,7 +189,6 @@ u32 ProgramClock(u32 refClock,
ulScore = ulPhaseScore + ulVcoScore;
if (!ulBestScore) {
- ulBestVCO = ulVCO;
ulBestOD = OD;
ulBestF = F;
ulBestR = R;
@@ -206,7 +205,6 @@ u32 ProgramClock(u32 refClock,
but we shall keep this code in case new restrictions come into play
--------------------------------------------------------------------------*/
if ((ulScore >= ulBestScore) && (OD > 0)) {
- ulBestVCO = ulVCO;
ulBestOD = OD;
ulBestF = F;
ulBestR = R;
--
2.25.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] video: fbdev: remove set but not used 'ulCoreClock'
2020-08-27 13:00 ` [PATCH] video: fbdev: remove set but not used 'ulBestVCO' Jason Yan
@ 2020-08-27 13:00 ` Jason Yan
2020-09-08 11:37 ` Bartlomiej Zolnierkiewicz
2020-09-08 11:37 ` [PATCH] video: fbdev: remove set but not used 'ulBestVCO' Bartlomiej Zolnierkiewicz
1 sibling, 1 reply; 4+ messages in thread
From: Jason Yan @ 2020-08-27 13:00 UTC (permalink / raw)
To: b.zolnierkie, yanaijie, dri-devel, linux-fbdev, linux-kernel; +Cc: Hulk Robot
This addresses the following gcc warning with "make W=1":
drivers/video/fbdev/kyro/STG4000InitDevice.c: In function
‘SetCoreClockPLL’:
drivers/video/fbdev/kyro/STG4000InitDevice.c:247:6: warning: variable
‘ulCoreClock’ set but not used [-Wunused-but-set-variable] // yanaijie
fixed
247 | u32 ulCoreClock;
| ^~~~~~~~~~~
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
drivers/video/fbdev/kyro/STG4000InitDevice.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/kyro/STG4000InitDevice.c b/drivers/video/fbdev/kyro/STG4000InitDevice.c
index 1d3f2080aa6f..edaeec2d9590 100644
--- a/drivers/video/fbdev/kyro/STG4000InitDevice.c
+++ b/drivers/video/fbdev/kyro/STG4000InitDevice.c
@@ -244,7 +244,6 @@ int SetCoreClockPLL(volatile STG4000REG __iomem *pSTGReg, struct pci_dev *pDev)
{
u32 F, R, P;
u16 core_pll = 0, sub;
- u32 ulCoreClock;
u32 tmp;
u32 ulChipSpeed;
@@ -282,7 +281,7 @@ int SetCoreClockPLL(volatile STG4000REG __iomem *pSTGReg, struct pci_dev *pDev)
if (ulChipSpeed = 0)
return -EINVAL;
- ulCoreClock = ProgramClock(REF_FREQ, CORE_PLL_FREQ, &F, &R, &P);
+ ProgramClock(REF_FREQ, CORE_PLL_FREQ, &F, &R, &P);
core_pll |= ((P) | ((F - 2) << 2) | ((R - 2) << 11));
--
2.25.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] video: fbdev: remove set but not used 'ulBestVCO'
2020-08-27 13:00 ` [PATCH] video: fbdev: remove set but not used 'ulBestVCO' Jason Yan
2020-08-27 13:00 ` [PATCH] video: fbdev: remove set but not used 'ulCoreClock' Jason Yan
@ 2020-09-08 11:37 ` Bartlomiej Zolnierkiewicz
1 sibling, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-09-08 11:37 UTC (permalink / raw)
To: Jason Yan; +Cc: Hulk Robot, linux-fbdev, linux-kernel, dri-devel
On 8/27/20 3:00 PM, Jason Yan wrote:
> This addresses the following gcc warning with "make W=1":
>
> drivers/video/fbdev/kyro/STG4000InitDevice.c: In function
> ‘ProgramClock’:
> drivers/video/fbdev/kyro/STG4000InitDevice.c:123:6: warning: variable
> ‘ulBestVCO’ set but not used [-Wunused-but-set-variable]
> 123 | u32 ulBestVCO = 0, ulBestClk = 0, ulBestScore = 0;
> | ^~~~~~~~~
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Applied to drm-misc-next tree, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
> ---
> drivers/video/fbdev/kyro/STG4000InitDevice.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/video/fbdev/kyro/STG4000InitDevice.c b/drivers/video/fbdev/kyro/STG4000InitDevice.c
> index edaeec2d9590..21875d3c2dc2 100644
> --- a/drivers/video/fbdev/kyro/STG4000InitDevice.c
> +++ b/drivers/video/fbdev/kyro/STG4000InitDevice.c
> @@ -120,7 +120,7 @@ u32 ProgramClock(u32 refClock,
> {
> u32 R = 0, F = 0, OD = 0, ODIndex = 0;
> u32 ulBestR = 0, ulBestF = 0, ulBestOD = 0;
> - u32 ulBestVCO = 0, ulBestClk = 0, ulBestScore = 0;
> + u32 ulBestClk = 0, ulBestScore = 0;
> u32 ulScore, ulPhaseScore, ulVcoScore;
> u32 ulTmp = 0, ulVCO;
> u32 ulScaleClockReq, ulMinClock, ulMaxClock;
> @@ -189,7 +189,6 @@ u32 ProgramClock(u32 refClock,
> ulScore = ulPhaseScore + ulVcoScore;
>
> if (!ulBestScore) {
> - ulBestVCO = ulVCO;
> ulBestOD = OD;
> ulBestF = F;
> ulBestR = R;
> @@ -206,7 +205,6 @@ u32 ProgramClock(u32 refClock,
> but we shall keep this code in case new restrictions come into play
> --------------------------------------------------------------------------*/
> if ((ulScore >= ulBestScore) && (OD > 0)) {
> - ulBestVCO = ulVCO;
> ulBestOD = OD;
> ulBestF = F;
> ulBestR = R;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] video: fbdev: remove set but not used 'ulCoreClock'
2020-08-27 13:00 ` [PATCH] video: fbdev: remove set but not used 'ulCoreClock' Jason Yan
@ 2020-09-08 11:37 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-09-08 11:37 UTC (permalink / raw)
To: Jason Yan; +Cc: Hulk Robot, linux-fbdev, linux-kernel, dri-devel
On 8/27/20 3:00 PM, Jason Yan wrote:
> This addresses the following gcc warning with "make W=1":
>
> drivers/video/fbdev/kyro/STG4000InitDevice.c: In function
> ‘SetCoreClockPLL’:
> drivers/video/fbdev/kyro/STG4000InitDevice.c:247:6: warning: variable
> ‘ulCoreClock’ set but not used [-Wunused-but-set-variable] // yanaijie
> fixed
> 247 | u32 ulCoreClock;
> | ^~~~~~~~~~~
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Applied to drm-misc-next tree, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
> ---
> drivers/video/fbdev/kyro/STG4000InitDevice.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/kyro/STG4000InitDevice.c b/drivers/video/fbdev/kyro/STG4000InitDevice.c
> index 1d3f2080aa6f..edaeec2d9590 100644
> --- a/drivers/video/fbdev/kyro/STG4000InitDevice.c
> +++ b/drivers/video/fbdev/kyro/STG4000InitDevice.c
> @@ -244,7 +244,6 @@ int SetCoreClockPLL(volatile STG4000REG __iomem *pSTGReg, struct pci_dev *pDev)
> {
> u32 F, R, P;
> u16 core_pll = 0, sub;
> - u32 ulCoreClock;
> u32 tmp;
> u32 ulChipSpeed;
>
> @@ -282,7 +281,7 @@ int SetCoreClockPLL(volatile STG4000REG __iomem *pSTGReg, struct pci_dev *pDev)
> if (ulChipSpeed = 0)
> return -EINVAL;
>
> - ulCoreClock = ProgramClock(REF_FREQ, CORE_PLL_FREQ, &F, &R, &P);
> + ProgramClock(REF_FREQ, CORE_PLL_FREQ, &F, &R, &P);
>
> core_pll |= ((P) | ((F - 2) << 2) | ((R - 2) << 11));
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-08 11:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20200827130039eucas1p124a0c2d9912f55281386c9318013a17a@eucas1p1.samsung.com>
2020-08-27 13:00 ` [PATCH] video: fbdev: remove set but not used 'ulBestVCO' Jason Yan
2020-08-27 13:00 ` [PATCH] video: fbdev: remove set but not used 'ulCoreClock' Jason Yan
2020-09-08 11:37 ` Bartlomiej Zolnierkiewicz
2020-09-08 11:37 ` [PATCH] video: fbdev: remove set but not used 'ulBestVCO' 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).