diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-11-07 05:22:37 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2018-11-07 22:19:19 +0300 |
commit | 96c1c58eb0d715d3f66f374bb07aa96cb7cdd1fa (patch) | |
tree | a7caddf3e71cdd89ed942b078692d086e16d6656 | |
parent | 8fd8cbfeada59d381c49ad700607376416e2fdd8 (diff) | |
download | linux-96c1c58eb0d715d3f66f374bb07aa96cb7cdd1fa.tar.xz |
EDAC, i82975x: Remove set but not used variable dtype
Fix this gcc -Wunused-but-set-variable warning:
drivers/edac/i82975x_edac.c:378:16: warning: variable 'dtype'
set but not used [-Wunused-but-set-variable]
It was introduced in
084a4fccef39 ("edac: move dimm properties to struct dimm_info")
but never used.
Also, remove the function i82975x_dram_type() and move the comment and
the assignment to the place where it is used.
[ bp: massage commit message and shorten comment. ]
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
CC: "Arvind R." <arvino55@gmail.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: ravi@jetztechnologies.com
CC: arvino55@gmail.com
CC: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20181107022237.14048-1-yuehaibing@huawei.com
-rw-r--r-- | drivers/edac/i82975x_edac.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c index 892815eaa97b..d514e7a8fa4d 100644 --- a/drivers/edac/i82975x_edac.c +++ b/drivers/edac/i82975x_edac.c @@ -358,14 +358,6 @@ static int dual_channel_active(void __iomem *mch_window) return dualch; } -static enum dev_type i82975x_dram_type(void __iomem *mch_window, int rank) -{ - /* - * ECC is possible on i92975x ONLY with DEV_X8 - */ - return DEV_X8; -} - static void i82975x_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, void __iomem *mch_window) { @@ -375,7 +367,6 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci, u32 cumul_size, nr_pages; int index, chan; struct dimm_info *dimm; - enum dev_type dtype; last_cumul_size = 0; @@ -413,7 +404,6 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci, * [0-7] for single-channel; i.e. csrow->nr_channels = 1 * [0-3] for dual-channel; i.e. csrow->nr_channels = 2 */ - dtype = i82975x_dram_type(mch_window, index); for (chan = 0; chan < csrow->nr_channels; chan++) { dimm = mci->csrows[index]->channels[chan]->dimm; @@ -423,7 +413,10 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci, (chan == 0) ? 'A' : 'B', index); dimm->grain = 1 << 7; /* 128Byte cache-line resolution */ - dimm->dtype = i82975x_dram_type(mch_window, index); + + /* ECC is possible on i92975x ONLY with DEV_X8. */ + dimm->dtype = DEV_X8; + dimm->mtype = MEM_DDR2; /* I82975x supports only DDR2 */ dimm->edac_mode = EDAC_SECDED; /* only supported */ } |