aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i5400_edac.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-04-28 15:41:46 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-06-11 12:23:48 -0400
commit7e881856eee8b889b76cd1d8e04ce2fc79b72099 (patch)
tree1cd297b48d2193bce416a5516583fe65630c2d45 /drivers/edac/i5400_edac.c
parentdd23cd6eb1f59ba722a6e6aa228adff7c01404de (diff)
edac: Use more normal debugging macro style
Convert macros to a simpler style and enforce appropriate format checking when not CONFIG_EDAC_DEBUG. Use fmt and __VA_ARGS__, neaten macros. Move some string arrays to the debugfx uses and remove the now unnecessary CONFIG_EDAC_DEBUG variable block definitions. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i5400_edac.c')
-rw-r--r--drivers/edac/i5400_edac.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c
index be1880de33a..3004b946c40 100644
--- a/drivers/edac/i5400_edac.c
+++ b/drivers/edac/i5400_edac.c
@@ -300,24 +300,6 @@ static inline int extract_fbdchan_indx(u32 x)
300 return (x>>28) & 0x3; 300 return (x>>28) & 0x3;
301} 301}
302 302
303#ifdef CONFIG_EDAC_DEBUG
304/* MTR NUMROW */
305static const char *numrow_toString[] = {
306 "8,192 - 13 rows",
307 "16,384 - 14 rows",
308 "32,768 - 15 rows",
309 "65,536 - 16 rows"
310};
311
312/* MTR NUMCOL */
313static const char *numcol_toString[] = {
314 "1,024 - 10 columns",
315 "2,048 - 11 columns",
316 "4,096 - 12 columns",
317 "reserved"
318};
319#endif
320
321/* Device name and register DID (Device ID) */ 303/* Device name and register DID (Device ID) */
322struct i5400_dev_info { 304struct i5400_dev_info {
323 const char *ctl_name; /* name for this device */ 305 const char *ctl_name; /* name for this device */
@@ -915,8 +897,16 @@ static void decode_mtr(int slot_row, u16 mtr)
915 897
916 debugf2("\t\tNUMBANK: %d bank(s)\n", MTR_DRAM_BANKS(mtr)); 898 debugf2("\t\tNUMBANK: %d bank(s)\n", MTR_DRAM_BANKS(mtr));
917 debugf2("\t\tNUMRANK: %s\n", MTR_DIMM_RANK(mtr) ? "double" : "single"); 899 debugf2("\t\tNUMRANK: %s\n", MTR_DIMM_RANK(mtr) ? "double" : "single");
918 debugf2("\t\tNUMROW: %s\n", numrow_toString[MTR_DIMM_ROWS(mtr)]); 900 debugf2("\t\tNUMROW: %s\n",
919 debugf2("\t\tNUMCOL: %s\n", numcol_toString[MTR_DIMM_COLS(mtr)]); 901 MTR_DIMM_ROWS(mtr) == 0 ? "8,192 - 13 rows" :
902 MTR_DIMM_ROWS(mtr) == 1 ? "16,384 - 14 rows" :
903 MTR_DIMM_ROWS(mtr) == 2 ? "32,768 - 15 rows" :
904 "65,536 - 16 rows");
905 debugf2("\t\tNUMCOL: %s\n",
906 MTR_DIMM_COLS(mtr) == 0 ? "1,024 - 10 columns" :
907 MTR_DIMM_COLS(mtr) == 1 ? "2,048 - 11 columns" :
908 MTR_DIMM_COLS(mtr) == 2 ? "4,096 - 12 columns" :
909 "reserved");
920} 910}
921 911
922static void handle_channel(struct i5400_pvt *pvt, int dimm, int channel, 912static void handle_channel(struct i5400_pvt *pvt, int dimm, int channel,