OSDN Git Service

platform/x86: intel_ips: remove redundant variables slope and offset
authorColin Ian King <colin.king@canonical.com>
Wed, 11 Jul 2018 08:09:10 +0000 (09:09 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 18 Jul 2018 10:29:11 +0000 (13:29 +0300)
Variables slope and offset are being assigned but are never used hence
they are redundant and can be removed.

Cleans up clang warnings:
warning: variable 'slope' set but not used [-Wunused-but-set-variable]
warning: variable 'offset' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel_ips.c

index 014fc16..c5ece7e 100644 (file)
@@ -858,10 +858,7 @@ static u16 read_mgtv(struct ips_driver *ips)
 
 static u16 read_ptv(struct ips_driver *ips)
 {
-       u16 val, slope, offset;
-
-       slope = (ips->pta_val & PTA_SLOPE_MASK) >> PTA_SLOPE_SHIFT;
-       offset = ips->pta_val & PTA_OFFSET_MASK;
+       u16 val;
 
        val = thm_readw(THM_PTV) & PTV_MASK;