diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-05 04:10:31 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-10 10:44:59 -0400 |
commit | d88b85072fa7d406f54c30ceeabcd37e5a2ec21a (patch) | |
tree | c59cb7a9ab6aff69f0a980f839b96b336569aa9f /drivers/edac | |
parent | c344436319e898784febbeeea71d1b0f65ef53ae (diff) |
i7core_edac: Fix a bug when printing error counts with RDIMMs
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/i7core_edac.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 2c30493eae0f..821e8a1a09cf 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c | |||
@@ -1054,13 +1054,15 @@ static ssize_t i7core_ce_regs_show(struct mem_ctl_info *mci, char *data) | |||
1054 | count = sprintf(data, "data unavailable\n"); | 1054 | count = sprintf(data, "data unavailable\n"); |
1055 | return 0; | 1055 | return 0; |
1056 | } | 1056 | } |
1057 | if (!pvt->is_registered) | 1057 | if (!pvt->is_registered) { |
1058 | count = sprintf(data, "all channels " | 1058 | count = sprintf(data, "all channels " |
1059 | "UDIMM0: %lu UDIMM1: %lu UDIMM2: %lu\n", | 1059 | "UDIMM0: %lu UDIMM1: %lu UDIMM2: %lu\n", |
1060 | pvt->udimm_ce_count[0], | 1060 | pvt->udimm_ce_count[0], |
1061 | pvt->udimm_ce_count[1], | 1061 | pvt->udimm_ce_count[1], |
1062 | pvt->udimm_ce_count[2]); | 1062 | pvt->udimm_ce_count[2]); |
1063 | else | 1063 | data += count; |
1064 | total += count; | ||
1065 | } else { | ||
1064 | for (i = 0; i < NUM_CHANS; i++) { | 1066 | for (i = 0; i < NUM_CHANS; i++) { |
1065 | count = sprintf(data, "channel %d RDIMM0: %lu " | 1067 | count = sprintf(data, "channel %d RDIMM0: %lu " |
1066 | "RDIMM1: %lu RDIMM2: %lu\n", | 1068 | "RDIMM1: %lu RDIMM2: %lu\n", |
@@ -1068,9 +1070,10 @@ static ssize_t i7core_ce_regs_show(struct mem_ctl_info *mci, char *data) | |||
1068 | pvt->rdimm_ce_count[i][0], | 1070 | pvt->rdimm_ce_count[i][0], |
1069 | pvt->rdimm_ce_count[i][1], | 1071 | pvt->rdimm_ce_count[i][1], |
1070 | pvt->rdimm_ce_count[i][2]); | 1072 | pvt->rdimm_ce_count[i][2]); |
1071 | } | 1073 | data += count; |
1072 | data += count; | 1074 | total += count; |
1073 | total += count; | 1075 | } |
1076 | } | ||
1074 | 1077 | ||
1075 | return total; | 1078 | return total; |
1076 | } | 1079 | } |