All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] cmd: gpio: use correct printf code
@ 2019-01-06 10:31 Heinrich Schuchardt
  2019-01-08  0:38 ` Simon Glass
  2019-01-16  2:42 ` [U-Boot] [U-Boot,1/1] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2019-01-06 10:31 UTC (permalink / raw)
  To: u-boot

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
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 1/1] cmd: gpio: use correct printf code
  2019-01-06 10:31 [U-Boot] [PATCH 1/1] cmd: gpio: use correct printf code Heinrich Schuchardt
@ 2019-01-08  0:38 ` Simon Glass
  2019-01-16  2:42 ` [U-Boot] [U-Boot,1/1] " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2019-01-08  0:38 UTC (permalink / raw)
  To: u-boot

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [U-Boot,1/1] cmd: gpio: use correct printf code
  2019-01-06 10:31 [U-Boot] [PATCH 1/1] cmd: gpio: use correct printf code Heinrich Schuchardt
  2019-01-08  0:38 ` Simon Glass
@ 2019-01-16  2:42 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2019-01-16  2:42 UTC (permalink / raw)
  To: u-boot

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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190115/1f608b56/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-16  2:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-06 10:31 [U-Boot] [PATCH 1/1] cmd: gpio: use correct printf code Heinrich Schuchardt
2019-01-08  0:38 ` Simon Glass
2019-01-16  2:42 ` [U-Boot] [U-Boot,1/1] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.