EDAC, i5000: Remove set but not used local variables
authorYueHaibing <yuehaibing@huawei.com>
Tue, 11 Dec 2018 09:52:07 +0000 (17:52 +0800)
committerBorislav Petkov <bp@suse.de>
Tue, 11 Dec 2018 13:53:49 +0000 (14:53 +0100)
Remove unused local variables as reported by gcc's -Wunused-but-set-variable option.

 [ bp: simplify commit message. ]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: https://lkml.kernel.org/r/20181211095207.25936-1-yuehaibing@huawei.com
drivers/edac/i5000_edac.c

index 98bef13e313444d909b5f4f2c5ec938d67c5ca13..078a7351bf0566b9a53db577497ce78ac306d50a 100644 (file)
@@ -1134,8 +1134,6 @@ static void i5000_get_mc_regs(struct mem_ctl_info *mci)
        u32 actual_tolm;
        u16 limit;
        int slot_row;
-       int maxch;
-       int maxdimmperch;
        int way0, way1;
 
        pvt = mci->pvt_info;
@@ -1145,9 +1143,6 @@ static void i5000_get_mc_regs(struct mem_ctl_info *mci)
        pci_read_config_dword(pvt->system_address, AMBASE + sizeof(u32),
                        &pvt->u.ambase_top);
 
-       maxdimmperch = pvt->maxdimmperch;
-       maxch = pvt->maxch;
-
        edac_dbg(2, "AMBASE= 0x%lx  MAXCH= %d  MAX-DIMM-Per-CH= %d\n",
                 (long unsigned int)pvt->ambase, pvt->maxch, pvt->maxdimmperch);
 
@@ -1253,7 +1248,7 @@ static int i5000_init_csrows(struct mem_ctl_info *mci)
 {
        struct i5000_pvt *pvt;
        struct dimm_info *dimm;
-       int empty, channel_count;
+       int empty;
        int max_csrows;
        int mtr;
        int csrow_megs;
@@ -1261,8 +1256,6 @@ static int i5000_init_csrows(struct mem_ctl_info *mci)
        int slot;
 
        pvt = mci->pvt_info;
-
-       channel_count = pvt->maxch;
        max_csrows = pvt->maxdimmperch * 2;
 
        empty = 1;              /* Assume NO memory */