* [PATCH] EDAC: remove set but not used variable 'ecc_loc'
@ 2019-12-13 12:10 yu kuai
2019-12-13 23:11 ` Luck, Tony
0 siblings, 1 reply; 3+ messages in thread
From: yu kuai @ 2019-12-13 12:10 UTC (permalink / raw)
To: bp, mchehab, tony.luck, james.morse, rrichter
Cc: yukuai3, zhengbin13, yi.zhang, linux-edac, linux-kernel
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]
Signed-off-by: yu kuai <yukuai3@huawei.com>
---
drivers/edac/i5100_edac.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c
index 0ddc41e47a96..a7ccf7b13619 100644
--- a/drivers/edac/i5100_edac.c
+++ b/drivers/edac/i5100_edac.c
@@ -486,7 +486,6 @@ static void i5100_read_log(struct mem_ctl_info *mci, int chan,
u32 dw;
u32 dw2;
unsigned syndrome = 0;
- unsigned ecc_loc = 0;
unsigned merr;
unsigned bank;
unsigned rank;
@@ -499,7 +498,6 @@ static void i5100_read_log(struct mem_ctl_info *mci, int chan,
pci_read_config_dword(pdev, I5100_REDMEMA, &dw2);
syndrome = dw2;
pci_read_config_dword(pdev, I5100_REDMEMB, &dw2);
- ecc_loc = i5100_redmemb_ecc_locator(dw2);
}
if (i5100_validlog_recmemvalid(dw)) {
--
2.17.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] EDAC: remove set but not used variable 'ecc_loc'
2019-12-13 12:10 [PATCH] EDAC: remove set but not used variable 'ecc_loc' yu kuai
@ 2019-12-13 23:11 ` Luck, Tony
2019-12-16 1:11 ` yukuai (C)
0 siblings, 1 reply; 3+ messages in thread
From: Luck, Tony @ 2019-12-13 23:11 UTC (permalink / raw)
To: yu kuai
Cc: bp, mchehab, james.morse, rrichter, zhengbin13, yi.zhang,
linux-edac, linux-kernel
On Fri, Dec 13, 2019 at 08:10:36PM +0800, yu kuai wrote:
> @@ -499,7 +498,6 @@ static void i5100_read_log(struct mem_ctl_info *mci, int chan,
> pci_read_config_dword(pdev, I5100_REDMEMA, &dw2);
> syndrome = dw2;
> pci_read_config_dword(pdev, I5100_REDMEMB, &dw2);
> - ecc_loc = i5100_redmemb_ecc_locator(dw2);
> }
>
> if (i5100_validlog_recmemvalid(dw)) {
This deletes the only call to i5100_redmemb_ecc_locator(). Should
we delete the definition of the function too?
Is it worth making cosmetic cleanups to a driver for 12 year old h/w?
-Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] EDAC: remove set but not used variable 'ecc_loc'
2019-12-13 23:11 ` Luck, Tony
@ 2019-12-16 1:11 ` yukuai (C)
0 siblings, 0 replies; 3+ messages in thread
From: yukuai (C) @ 2019-12-16 1:11 UTC (permalink / raw)
To: Luck, Tony
Cc: bp, mchehab, james.morse, rrichter, zhengbin13, yi.zhang,
linux-edac, linux-kernel
On 2019/12/14 7:11, Luck, Tony wrote:
> On Fri, Dec 13, 2019 at 08:10:36PM +0800, yu kuai wrote:
>> @@ -499,7 +498,6 @@ static void i5100_read_log(struct mem_ctl_info *mci, int chan,
>> pci_read_config_dword(pdev, I5100_REDMEMA, &dw2);
>> syndrome = dw2;
>> pci_read_config_dword(pdev, I5100_REDMEMB, &dw2);
>> - ecc_loc = i5100_redmemb_ecc_locator(dw2);
>> }
>>
>> if (i5100_validlog_recmemvalid(dw)) {
>
> This deletes the only call to i5100_redmemb_ecc_locator(). Should
> we delete the definition of the function too?
Thank you for your response!
Yes, I think we can do that.
Thanks
Yu Kuai
>
> Is it worth making cosmetic cleanups to a driver for 12 year old h/w?
>
> -Tony
>
> .
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-16 1:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13 12:10 [PATCH] EDAC: remove set but not used variable 'ecc_loc' yu kuai
2019-12-13 23:11 ` Luck, Tony
2019-12-16 1:11 ` yukuai (C)
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).