[U-Boot] [PATCH 1/1] cmd: gpio: use correct printf code

gpio is defined as unsigned int. So we should use %u when calling printf().
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de --- cmd/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/gpio.c b/cmd/gpio.c index ecdc453918..c60946bc06 100644 --- a/cmd/gpio.c +++ b/cmd/gpio.c @@ -213,7 +213,7 @@ static int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } gpio_direction_output(gpio, value); } - printf("gpio: pin %s (gpio %i) value is ", str_gpio, gpio); + printf("gpio: pin %s (gpio %u) value is ", str_gpio, gpio); if (IS_ERR_VALUE(value)) printf("unknown (ret=%d)\n", value); else

On Sun, 6 Jan 2019 at 03:32, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
gpio is defined as unsigned int. So we should use %u when calling printf().
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
cmd/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Sun, Jan 06, 2019 at 11:31:54AM +0100, Heinrich Schuchardt wrote:
gpio is defined as unsigned int. So we should use %u when calling printf().
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!
participants (3)
-
Heinrich Schuchardt
-
Simon Glass
-
Tom Rini