Skip to content

Commit bd44735

Browse files
YueHaibingsuryasaimadhu
authored andcommitted
EDAC, i5000: Remove set but not used local variables
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
1 parent 8a88056 commit bd44735

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/edac/i5000_edac.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,8 +1134,6 @@ static void i5000_get_mc_regs(struct mem_ctl_info *mci)
11341134
u32 actual_tolm;
11351135
u16 limit;
11361136
int slot_row;
1137-
int maxch;
1138-
int maxdimmperch;
11391137
int way0, way1;
11401138

11411139
pvt = mci->pvt_info;
@@ -1145,9 +1143,6 @@ static void i5000_get_mc_regs(struct mem_ctl_info *mci)
11451143
pci_read_config_dword(pvt->system_address, AMBASE + sizeof(u32),
11461144
&pvt->u.ambase_top);
11471145

1148-
maxdimmperch = pvt->maxdimmperch;
1149-
maxch = pvt->maxch;
1150-
11511146
edac_dbg(2, "AMBASE= 0x%lx MAXCH= %d MAX-DIMM-Per-CH= %d\n",
11521147
(long unsigned int)pvt->ambase, pvt->maxch, pvt->maxdimmperch);
11531148

@@ -1253,16 +1248,14 @@ static int i5000_init_csrows(struct mem_ctl_info *mci)
12531248
{
12541249
struct i5000_pvt *pvt;
12551250
struct dimm_info *dimm;
1256-
int empty, channel_count;
1251+
int empty;
12571252
int max_csrows;
12581253
int mtr;
12591254
int csrow_megs;
12601255
int channel;
12611256
int slot;
12621257

12631258
pvt = mci->pvt_info;
1264-
1265-
channel_count = pvt->maxch;
12661259
max_csrows = pvt->maxdimmperch * 2;
12671260

12681261
empty = 1; /* Assume NO memory */

0 commit comments

Comments
 (0)