mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
To: <bp@alien8.de>, <mchehab@osg.samsung.com>, <dougthompson@xmission.com>
Cc: <linux-edac@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/3] EDAC, ghes_edac: Remove redundant memory_type array
Date: Wed, 16 Sep 2015 15:53:29 -0500	[thread overview]
Message-ID: <1442436811-23382-2-git-send-email-Aravind.Gopalakrishnan@amd.com> (raw)
In-Reply-To: <1442436811-23382-1-git-send-email-Aravind.Gopalakrishnan@amd.com>

We already have edac_mem_types[] that enumerates the different
kinds of memory. So, use that and remove the redundant
memory_type[] array here.

Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
---
 drivers/edac/ghes_edac.c | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index b246819..b1e4512 100644
--- a/drivers/edac/ghes_edac.c
+++ b/drivers/edac/ghes_edac.c
@@ -66,26 +66,6 @@ struct ghes_edac_dimm_fill {
 	unsigned count;
 };
 
-char *memory_type[] = {
-	[MEM_EMPTY] = "EMPTY",
-	[MEM_RESERVED] = "RESERVED",
-	[MEM_UNKNOWN] = "UNKNOWN",
-	[MEM_FPM] = "FPM",
-	[MEM_EDO] = "EDO",
-	[MEM_BEDO] = "BEDO",
-	[MEM_SDR] = "SDR",
-	[MEM_RDR] = "RDR",
-	[MEM_DDR] = "DDR",
-	[MEM_RDDR] = "RDDR",
-	[MEM_RMBS] = "RMBS",
-	[MEM_DDR2] = "DDR2",
-	[MEM_FB_DDR2] = "FB_DDR2",
-	[MEM_RDDR2] = "RDDR2",
-	[MEM_XDR] = "XDR",
-	[MEM_DDR3] = "DDR3",
-	[MEM_RDDR3] = "RDDR3",
-};
-
 static void ghes_edac_count_dimms(const struct dmi_header *dh, void *arg)
 {
 	int *num_dimm = arg;
@@ -173,7 +153,7 @@ static void ghes_edac_dmidecode(const struct dmi_header *dh, void *arg)
 
 		if (dimm->nr_pages) {
 			edac_dbg(1, "DIMM%i: %s size = %d MB%s\n",
-				dimm_fill->count, memory_type[dimm->mtype],
+				dimm_fill->count, edac_mem_types[dimm->mtype],
 				PAGES_TO_MiB(dimm->nr_pages),
 				(dimm->edac_mode != EDAC_NONE) ? "(ECC)" : "");
 			edac_dbg(2, "\ttype %d, detail 0x%02x, width %d(total %d)\n",
-- 
2.5.0


  reply	other threads:[~2015-09-16 21:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16 20:53 [PATCH 0/3] Updates to amd64_edac and ghes_edac Aravind Gopalakrishnan
2015-09-16 20:53 ` Aravind Gopalakrishnan [this message]
2015-09-24  9:24   ` [PATCH 1/3] EDAC, ghes_edac: Remove redundant memory_type array Borislav Petkov
2015-09-16 20:53 ` [PATCH 2/3] EDAC, amd64_edac: Extend scrub rate programmability feature for F15hM60h Aravind Gopalakrishnan
2015-09-24  9:18   ` Borislav Petkov
2015-09-24 16:15     ` Aravind Gopalakrishnan
2015-09-24 16:33       ` Borislav Petkov
2015-09-24 16:42         ` Aravind Gopalakrishnan
2015-09-16 20:53 ` [PATCH 3/3] EDAC, amd64_edac: Update copyright and documentation info Aravind Gopalakrishnan
2015-09-17  7:43   ` Borislav Petkov
2015-09-17 14:35     ` Aravind Gopalakrishnan
2015-09-17 15:24       ` Borislav Petkov
2015-09-17 15:33         ` Aravind Gopalakrishnan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1442436811-23382-2-git-send-email-Aravind.Gopalakrishnan@amd.com \
    --to=aravind.gopalakrishnan@amd.com \
    --cc=bp@alien8.de \
    --cc=dougthompson@xmission.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®