- for (i = 0; i < pvt->sockets; i++) {
- if (!pvt->ce_count_available[i]) {
- count = sprintf(data, "socket 0 data unavailable\n");
- continue;
- }
- if (!pvt->is_registered[i])
- count = sprintf(data, "socket %d, dimm0: %lu\n"
- "dimm1: %lu\ndimm2: %lu\n",
- i,
- pvt->udimm_ce_count[i][0],
- pvt->udimm_ce_count[i][1],
- pvt->udimm_ce_count[i][2]);
- else
- for (j = 0; j < NUM_CHANS; j++) {
- count = sprintf(data, "socket %d, channel %d "
- "RDIMM0: %lu "
- "RDIMM1: %lu RDIMM2: %lu\n",
- i, j,
- pvt->rdimm_ce_count[i][j][0],
- pvt->rdimm_ce_count[i][j][1],
- pvt->rdimm_ce_count[i][j][2]);
- }
- data += count;
- total += count;
+ if (!pvt->ce_count_available) {
+ count = sprintf(data, "data unavailable\n");
+ return 0;