* [PATCH -next] i5000_edac: remove set but not used variables 'maxdimmperch, maxch, channel_count'
@ 2018-12-11 9:52 YueHaibing
2018-12-11 13:58 ` Borislav Petkov
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-12-11 9:52 UTC (permalink / raw)
To: bp, mchehab; +Cc: linux-kernel, linux-edac, YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/edac/i5000_edac.c: In function 'i5000_get_mc_regs':
drivers/edac/i5000_edac.c:1138:6: warning:
variable 'maxdimmperch' set but not used [-Wunused-but-set-variable]
drivers/edac/i5000_edac.c:1137:6: warning:
variable 'maxch' set but not used [-Wunused-but-set-variable]
drivers/edac/i5000_edac.c: In function 'i5000_init_csrows':
drivers/edac/i5000_edac.c:1256:13: warning:
variable 'channel_count' set but not used [-Wunused-but-set-variable]
It never used since introduction in
commit eb60705ac5a9 ("drivers/edac: new intel 5000 MC driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/edac/i5000_edac.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
index 98bef13..078a735 100644
--- a/drivers/edac/i5000_edac.c
+++ b/drivers/edac/i5000_edac.c
@@ -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 */
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] i5000_edac: remove set but not used variables 'maxdimmperch, maxch, channel_count'
2018-12-11 9:52 [PATCH -next] i5000_edac: remove set but not used variables 'maxdimmperch, maxch, channel_count' YueHaibing
@ 2018-12-11 13:58 ` Borislav Petkov
0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2018-12-11 13:58 UTC (permalink / raw)
To: YueHaibing; +Cc: mchehab, linux-kernel, linux-edac
On Tue, Dec 11, 2018 at 05:52:07PM +0800, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/edac/i5000_edac.c: In function 'i5000_get_mc_regs':
> drivers/edac/i5000_edac.c:1138:6: warning:
> variable 'maxdimmperch' set but not used [-Wunused-but-set-variable]
>
> drivers/edac/i5000_edac.c:1137:6: warning:
> variable 'maxch' set but not used [-Wunused-but-set-variable]
>
> drivers/edac/i5000_edac.c: In function 'i5000_init_csrows':
> drivers/edac/i5000_edac.c:1256:13: warning:
> variable 'channel_count' set but not used [-Wunused-but-set-variable]
>
> It never used since introduction in
> commit eb60705ac5a9 ("drivers/edac: new intel 5000 MC driver")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/edac/i5000_edac.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
Applied, thanks.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-11 13:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11 9:52 [PATCH -next] i5000_edac: remove set but not used variables 'maxdimmperch, maxch, channel_count' YueHaibing
2018-12-11 13:58 ` Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).