aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-02-12 15:18:06 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-28 18:13:51 -0400
commit68d086f89b8064d5576f8c1e47fa7ecb4fd6f141 (patch)
treea08bbec14c0519e6264fb1251a1a912683dbb752 /drivers
parente17a2f42a484562be48128c5b8dc9f7291e8c902 (diff)
i5400_edac: improve debug messages to better represent the filled memory
Improves the debug output message, in order to better represent the memory controller hierarchy, when outputing the debug messages. No functional changes when debug is disabled. Reviewed-by: Aristeu Rozanski <arozansk@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/edac/i5400_edac.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c
index ff7bf8050c9c..6640c29e1885 100644
--- a/drivers/edac/i5400_edac.c
+++ b/drivers/edac/i5400_edac.c
@@ -963,7 +963,7 @@ static void calculate_dimm_size(struct i5400_pvt *pvt)
963 int dimm, max_dimms; 963 int dimm, max_dimms;
964 char *p, *mem_buffer; 964 char *p, *mem_buffer;
965 int space, n; 965 int space, n;
966 int channel; 966 int channel, branch;
967 967
968 /* ================= Generate some debug output ================= */ 968 /* ================= Generate some debug output ================= */
969 space = PAGE_SIZE; 969 space = PAGE_SIZE;
@@ -1028,6 +1028,19 @@ static void calculate_dimm_size(struct i5400_pvt *pvt)
1028 space -= n; 1028 space -= n;
1029 } 1029 }
1030 1030
1031 space -= n;
1032 debugf2("%s\n", mem_buffer);
1033 p = mem_buffer;
1034 space = PAGE_SIZE;
1035
1036 n = snprintf(p, space, " ");
1037 p += n;
1038 for (branch = 0; branch < MAX_BRANCHES; branch++) {
1039 n = snprintf(p, space, " branch %d | ", branch);
1040 p += n;
1041 space -= n;
1042 }
1043
1031 /* output the last message and free buffer */ 1044 /* output the last message and free buffer */
1032 debugf2("%s\n", mem_buffer); 1045 debugf2("%s\n", mem_buffer);
1033 kfree(mem_buffer); 1046 kfree(mem_buffer);