Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Zhu Jun and committed by
Bartosz Golaszewski
ac93ca12 f7176724

+2 -2
+2 -2
tools/gpio/gpio-hammer.c
··· 54 54 55 55 fprintf(stdout, "Hammer lines ["); 56 56 for (i = 0; i < num_lines; i++) { 57 - fprintf(stdout, "%d", lines[i]); 57 + fprintf(stdout, "%u", lines[i]); 58 58 if (i != (num_lines - 1)) 59 59 fprintf(stdout, ", "); 60 60 } ··· 89 89 90 90 fprintf(stdout, "["); 91 91 for (i = 0; i < num_lines; i++) { 92 - fprintf(stdout, "%d: %d", lines[i], 92 + fprintf(stdout, "%u: %d", lines[i], 93 93 gpiotools_test_bit(values.bits, i)); 94 94 if (i != (num_lines - 1)) 95 95 fprintf(stdout, ", ");