projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f717672
)
tools: gpio: Fix the wrong format specifier
author
Zhu Jun
<zhujun2@cmss.chinamobile.com>
Wed, 24 Jul 2024 02:46:36 +0000
(19:46 -0700)
committer
Bartosz Golaszewski
<bartosz.golaszewski@linaro.org>
Wed, 31 Jul 2024 07:56:52 +0000
(09:56 +0200)
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>
tools/gpio/gpio-hammer.c
patch
|
blob
|
history
diff --git
a/tools/gpio/gpio-hammer.c
b/tools/gpio/gpio-hammer.c
index 54fdf59dd320def06f572e24eee826a770c0fa8b..ba0866eb3581453c49cad85473ad17221a5f2e87 100644
(file)
--- 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, ", ");