aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/amd64_edac.c
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2009-11-12 09:33:16 -0500
committerBorislav Petkov <borislav.petkov@amd.com>2009-12-07 13:14:31 -0500
commit239642fe19adc19ba0a69e96f3b1904dfd6a3b9f (patch)
tree76ea52d36740bb726746e0a3f49c3f9ac4fd78e8 /drivers/edac/amd64_edac.c
parentcec7924f568eddcccdbfd814b136554b1b8dc624 (diff)
edac: add memory types strings for debugging
Instead of using deeply-nested conditionals for dumping the DIMM type in debug mode, add a strings array of the supported DIMM types. This is useful in cases where an edac driver supports multiple DRAM types and is only defined in debug builds. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.c')
-rw-r--r--drivers/edac/amd64_edac.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index c403af2e0081..708d065efc95 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1024,10 +1024,7 @@ static enum mem_type amd64_determine_memory_type(struct amd64_pvt *pvt)
1024 type = (pvt->dclr0 & BIT(18)) ? MEM_DDR : MEM_RDDR; 1024 type = (pvt->dclr0 & BIT(18)) ? MEM_DDR : MEM_RDDR;
1025 } 1025 }
1026 1026
1027 debugf1(" Memory type is: %s\n", 1027 debugf1(" Memory type is: %s\n", edac_mem_types[type]);
1028 (type == MEM_DDR2) ? "MEM_DDR2" :
1029 (type == MEM_RDDR2) ? "MEM_RDDR2" :
1030 (type == MEM_DDR) ? "MEM_DDR" : "MEM_RDDR");
1031 1028
1032 return type; 1029 return type;
1033} 1030}