Commit 9ec8ade8 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Mark Brown

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: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20200608100049.30648-1-geert+renesas@glider.beSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8bdd79da
...@@ -461,8 +461,8 @@ int main(int argc, char *argv[]) ...@@ -461,8 +461,8 @@ int main(int argc, char *argv[])
pabort("can't get max speed hz"); pabort("can't get max speed hz");
printf("spi mode: 0x%x\n", mode); printf("spi mode: 0x%x\n", mode);
printf("bits per word: %d\n", bits); printf("bits per word: %u\n", bits);
printf("max speed: %d Hz (%d KHz)\n", speed, speed/1000); printf("max speed: %u Hz (%u kHz)\n", speed, speed/1000);
if (input_tx) if (input_tx)
transfer_escaped_string(fd, input_tx); transfer_escaped_string(fd, input_tx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment