Skip to content

Commit

Permalink
i5400_edac: improve debug messages to better represent the filled memory
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
Mauro Carvalho Chehab committed May 28, 2012
1 parent e17a2f4 commit 68d086f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion drivers/edac/i5400_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ static void calculate_dimm_size(struct i5400_pvt *pvt)
int dimm, max_dimms;
char *p, *mem_buffer;
int space, n;
int channel;
int channel, branch;

/* ================= Generate some debug output ================= */
space = PAGE_SIZE;
Expand Down Expand Up @@ -1028,6 +1028,19 @@ static void calculate_dimm_size(struct i5400_pvt *pvt)
space -= n;
}

space -= n;
debugf2("%s\n", mem_buffer);
p = mem_buffer;
space = PAGE_SIZE;

n = snprintf(p, space, " ");
p += n;
for (branch = 0; branch < MAX_BRANCHES; branch++) {
n = snprintf(p, space, " branch %d | ", branch);
p += n;
space -= n;
}

/* output the last message and free buffer */
debugf2("%s\n", mem_buffer);
kfree(mem_buffer);
Expand Down

0 comments on commit 68d086f

Please sign in to comment.