summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorZhu Jun <zhujun2@cmss.chinamobile.com>2024-07-24 04:46:36 +0200
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-07-31 09:56:52 +0200
commitac93ca125b5409df56c5139648bbe10fd1ea989b (patch)
tree91e9c84a2b5e51a84561d59e88a8a1f07e8acb3b /tools
parentdt-bindings: gpio: nxp,lpc3220-gpio: Convert to dtschema (diff)
downloadlinux-ac93ca125b5409df56c5139648bbe10fd1ea989b.tar.xz
linux-ac93ca125b5409df56c5139648bbe10fd1ea989b.zip
tools: gpio: Fix the wrong format specifier
The unsigned int should use "%u" instead of "%d". Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20240724024636.3634-1-zhujun2@cmss.chinamobile.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/gpio/gpio-hammer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gpio/gpio-hammer.c b/tools/gpio/gpio-hammer.c
index 54fdf59dd320..ba0866eb3581 100644
--- a/tools/gpio/gpio-hammer.c
+++ b/tools/gpio/gpio-hammer.c
@@ -54,7 +54,7 @@ int hammer_device(const char *device_name, unsigned int *lines, int num_lines,
fprintf(stdout, "Hammer lines [");
for (i = 0; i < num_lines; i++) {
- fprintf(stdout, "%d", lines[i]);
+ fprintf(stdout, "%u", lines[i]);
if (i != (num_lines - 1))
fprintf(stdout, ", ");
}
@@ -89,7 +89,7 @@ int hammer_device(const char *device_name, unsigned int *lines, int num_lines,
fprintf(stdout, "[");
for (i = 0; i < num_lines; i++) {
- fprintf(stdout, "%d: %d", lines[i],
+ fprintf(stdout, "%u: %d", lines[i],
gpiotools_test_bit(values.bits, i));
if (i != (num_lines - 1))
fprintf(stdout, ", ");