OSDN Git Service

video: fbdev: kyro: remove set but not used 'ulCoreClock'
authorJason Yan <yanaijie@huawei.com>
Thu, 27 Aug 2020 13:00:28 +0000 (21:00 +0800)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Tue, 8 Sep 2020 11:33:31 +0000 (13:33 +0200)
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>
[b.zolnierkie: minor patch summary fixup]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200827130028.428893-1-yanaijie@huawei.com
drivers/video/fbdev/kyro/STG4000InitDevice.c

index 39438ba..21875d3 100644 (file)
@@ -242,7 +242,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;
 
@@ -280,7 +279,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));