mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
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>
This commit is contained in:
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 [");
|
||||
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, ", ");
|
||||
|
Loading…
Reference in New Issue
Block a user