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>pull/958/head
parent
f7176724e7
commit
ac93ca125b
|
|
@ -54,7 +54,7 @@ int hammer_device(const char *device_name, unsigned int *lines, int num_lines,
|
||||||
|
|
||||||
fprintf(stdout, "Hammer lines [");
|
fprintf(stdout, "Hammer lines [");
|
||||||
for (i = 0; i < num_lines; i++) {
|
for (i = 0; i < num_lines; i++) {
|
||||||
fprintf(stdout, "%d", lines[i]);
|
fprintf(stdout, "%u", lines[i]);
|
||||||
if (i != (num_lines - 1))
|
if (i != (num_lines - 1))
|
||||||
fprintf(stdout, ", ");
|
fprintf(stdout, ", ");
|
||||||
}
|
}
|
||||||
|
|
@ -89,7 +89,7 @@ int hammer_device(const char *device_name, unsigned int *lines, int num_lines,
|
||||||
|
|
||||||
fprintf(stdout, "[");
|
fprintf(stdout, "[");
|
||||||
for (i = 0; i < num_lines; i++) {
|
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));
|
gpiotools_test_bit(values.bits, i));
|
||||||
if (i != (num_lines - 1))
|
if (i != (num_lines - 1))
|
||||||
fprintf(stdout, ", ");
|
fprintf(stdout, ", ");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue