summaryrefslogtreecommitdiffstats
path: root/tools/spi
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2020-06-08 12:00:49 +0200
committerMark Brown <broonie@kernel.org>2020-06-08 13:42:44 +0100
commit9ec8ade812240f3ef553b5e8bfc74deec3f14339 (patch)
treebd30f7f69644f34d2d27cb2861ed15f7aa9acbc5 /tools/spi
parent8bdd79dae1ff5397351b95e249abcae126572617 (diff)
downloadlinux-stable-9ec8ade812240f3ef553b5e8bfc74deec3f14339.tar.gz
linux-stable-9ec8ade812240f3ef553b5e8bfc74deec3f14339.tar.bz2
linux-stable-9ec8ade812240f3ef553b5e8bfc74deec3f14339.zip
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 <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200608100049.30648-1-geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/spi')
-rw-r--r--tools/spi/spidev_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c
index eec23fa693bd..56ea053f72f2 100644
--- a/tools/spi/spidev_test.c
+++ b/tools/spi/spidev_test.c
@@ -461,8 +461,8 @@ int main(int argc, char *argv[])
pabort("can't get max speed hz");
printf("spi mode: 0x%x\n", mode);
- printf("bits per word: %d\n", bits);
- printf("max speed: %d Hz (%d KHz)\n", speed, speed/1000);
+ printf("bits per word: %u\n", bits);
+ printf("max speed: %u Hz (%u kHz)\n", speed, speed/1000);
if (input_tx)
transfer_escaped_string(fd, input_tx);