Skip to content

Commit 9ec8ade

Browse files
geertubroonie
authored andcommitted
spi: spidev_test: Use %u to format unsigned numbers
Consistently use %u to format unsigned numbers. For "bits" this doesn't matter that much, as it is "uint8_t". However, "speed" is "uint32_t", so in case people use "-s -1" to force the maximum, they would see: max speed: -1 Hz (4294967 KHz) While at it, use "k" (kilo) instead of "K" (kelvin) in "kHz". Signed-off-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 8bdd79d commit 9ec8ade

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/spi/spidev_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,8 @@ int main(int argc, char *argv[])
461461
pabort("can't get max speed hz");
462462

463463
printf("spi mode: 0x%x\n", mode);
464-
printf("bits per word: %d\n", bits);
465-
printf("max speed: %d Hz (%d KHz)\n", speed, speed/1000);
464+
printf("bits per word: %u\n", bits);
465+
printf("max speed: %u Hz (%u kHz)\n", speed, speed/1000);
466466

467467
if (input_tx)
468468
transfer_escaped_string(fd, input_tx);

0 commit comments

Comments
 (0)