Simplify the logic to "always print a ',' for each cache except if it is the
last one. This is also a preparation patch for printing the cache column for
offline CPUs where it would print one colon too much because of the current
logic.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
for (x = 0; x < ca->nsharedmaps; x++) {
if (CPU_ISSET_S(i, setsize, ca->sharedmaps[x])) {
- if (j != desc->ncaches - 1)
- putchar(compatible ? ',' : ':');
printf("%d", x);
break;
}
}
- if (x == ca->nsharedmaps)
+ if (j != 0)
putchar(compatible ? ',' : ':');
}
break;