Skip to content

Commit 2403ed2

Browse files
YuKuai-huaweiaegl
authored andcommitted
EDAC: remove set but not used variable 'ecc_loc'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/edac/i5100_edac.c: In function ‘i5100_read_log’: drivers/edac/i5100_edac.c:489:11: warning: variable ‘ecc_loc’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai <[email protected]> Reviewed-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Tony Luck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 854bb48 commit 2403ed2

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

drivers/edac/i5100_edac.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,6 @@ static inline u32 i5100_nrecmemb_ras(u32 a)
259259
return a & ((1 << 16) - 1);
260260
}
261261

262-
static inline u32 i5100_redmemb_ecc_locator(u32 a)
263-
{
264-
return a & ((1 << 18) - 1);
265-
}
266-
267262
static inline u32 i5100_recmema_merr(u32 a)
268263
{
269264
return i5100_nrecmema_merr(a);
@@ -486,7 +481,6 @@ static void i5100_read_log(struct mem_ctl_info *mci, int chan,
486481
u32 dw;
487482
u32 dw2;
488483
unsigned syndrome = 0;
489-
unsigned ecc_loc = 0;
490484
unsigned merr;
491485
unsigned bank;
492486
unsigned rank;
@@ -499,7 +493,6 @@ static void i5100_read_log(struct mem_ctl_info *mci, int chan,
499493
pci_read_config_dword(pdev, I5100_REDMEMA, &dw2);
500494
syndrome = dw2;
501495
pci_read_config_dword(pdev, I5100_REDMEMB, &dw2);
502-
ecc_loc = i5100_redmemb_ecc_locator(dw2);
503496
}
504497

505498
if (i5100_validlog_recmemvalid(dw)) {

0 commit comments

Comments
 (0)