Commit ac93ca12 authored by Zhu Jun's avatar Zhu Jun Committed by Bartosz Golaszewski

tools: gpio: Fix the wrong format specifier

The unsigned int should use "%u" instead of "%d".
Signed-off-by: default avatarZhu Jun <zhujun2@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20240724024636.3634-1-zhujun2@cmss.chinamobile.comSigned-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent f7176724
......@@ -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, ", ");
......
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