Skip to content

Commit

Permalink
i7core_edac: Fix a bug when printing error counts with RDIMMs
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed May 10, 2010
1 parent c344436 commit d88b850
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,23 +1054,26 @@ static ssize_t i7core_ce_regs_show(struct mem_ctl_info *mci, char *data)
count = sprintf(data, "data unavailable\n");
return 0;
}
if (!pvt->is_registered)
if (!pvt->is_registered) {
count = sprintf(data, "all channels "
"UDIMM0: %lu UDIMM1: %lu UDIMM2: %lu\n",
pvt->udimm_ce_count[0],
pvt->udimm_ce_count[1],
pvt->udimm_ce_count[2]);
else
data += count;
total += count;
} else {
for (i = 0; i < NUM_CHANS; i++) {
count = sprintf(data, "channel %d RDIMM0: %lu "
"RDIMM1: %lu RDIMM2: %lu\n",
i,
pvt->rdimm_ce_count[i][0],
pvt->rdimm_ce_count[i][1],
pvt->rdimm_ce_count[i][2]);
}
data += count;
total += count;
data += count;
total += count;
}
}

return total;
}
Expand Down

0 comments on commit d88b850

Please sign in to comment.