public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] tools/atmelimage.c: Fix warning when debug is enabled
@ 2015-08-26 19:21 Tom Rini
  2015-08-26 19:21 ` [U-Boot] [PATCH 2/2] tools/mkimage.c: Clarify help text for -D slightly Tom Rini
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tom Rini @ 2015-08-26 19:21 UTC (permalink / raw)
  To: u-boot

Otherwise we get:
tools/atmelimage.c:134:3: warning: format ?%d? expects argument of type ?int?, but argument 2 has type ?size_t? [-Wformat=]
debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1,
^

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 tools/atmelimage.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/atmelimage.c b/tools/atmelimage.c
index 5b72ac5..0979eef 100644
--- a/tools/atmelimage.c
+++ b/tools/atmelimage.c
@@ -131,7 +131,7 @@ static int atmel_verify_header(unsigned char *ptr, int image_size,
 
 	/* check the seven interrupt vectors of binary */
 	for (pos = 0; pos < 7; pos++) {
-		debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1,
+		debug("atmelimage: interrupt vector #%ld is 0x%08X\n", pos+1,
 		      ints[pos]);
 		/*
 		 * all vectors except the 6'th one must contain valid
-- 
1.7.9.5

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

* [U-Boot] [PATCH 2/2] tools/mkimage.c: Clarify help text for -D slightly
  2015-08-26 19:21 [U-Boot] [PATCH 1/2] tools/atmelimage.c: Fix warning when debug is enabled Tom Rini
@ 2015-08-26 19:21 ` Tom Rini
  2015-10-12 15:15   ` [U-Boot] [U-Boot, " Tom Rini
  2015-08-27 10:37 ` [U-Boot] [PATCH 1/2] tools/atmelimage.c: Fix warning when debug is enabled Andreas Bießmann
       [not found] ` <1440698088-1152-1-git-send-email-trini@konsulko.com>
  2 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2015-08-26 19:21 UTC (permalink / raw)
  To: u-boot

Try and make it clear that -D will replace all arguments passed to dtc
and is not appending them.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 tools/mkimage.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/mkimage.c b/tools/mkimage.c
index e81d455..22449cc 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -594,7 +594,7 @@ static void usage(void)
 		params.cmdname);
 	fprintf(stderr, "       %s [-D dtc_options] [-f fit-image.its|-F] fit-image\n",
 		params.cmdname);
-	fprintf(stderr, "          -D => set options for device tree compiler\n"
+	fprintf(stderr, "          -D => set all options for device tree compiler\n"
 			"          -f => input filename for FIT source\n");
 #ifdef CONFIG_FIT_SIGNATURE
 	fprintf(stderr, "Signing / verified boot options: [-k keydir] [-K dtb] [ -c <comment>] [-r]\n"
-- 
1.7.9.5

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

* [U-Boot] [PATCH 1/2] tools/atmelimage.c: Fix warning when debug is enabled
  2015-08-26 19:21 [U-Boot] [PATCH 1/2] tools/atmelimage.c: Fix warning when debug is enabled Tom Rini
  2015-08-26 19:21 ` [U-Boot] [PATCH 2/2] tools/mkimage.c: Clarify help text for -D slightly Tom Rini
@ 2015-08-27 10:37 ` Andreas Bießmann
  2015-08-27 11:26   ` Tom Rini
       [not found] ` <1440698088-1152-1-git-send-email-trini@konsulko.com>
  2 siblings, 1 reply; 7+ messages in thread
From: Andreas Bießmann @ 2015-08-27 10:37 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On 08/26/2015 09:21 PM, Tom Rini wrote:
> Otherwise we get:
> tools/atmelimage.c:134:3: warning: format ?%d? expects argument of type ?int?, but argument 2 has type ?size_t? [-Wformat=]
> debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1,
> ^
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>  tools/atmelimage.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/atmelimage.c b/tools/atmelimage.c
> index 5b72ac5..0979eef 100644
> --- a/tools/atmelimage.c
> +++ b/tools/atmelimage.c
> @@ -131,7 +131,7 @@ static int atmel_verify_header(unsigned char *ptr, int image_size,
>  
>  	/* check the seven interrupt vectors of binary */
>  	for (pos = 0; pos < 7; pos++) {
> -		debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1,
> +		debug("atmelimage: interrupt vector #%ld is 0x%08X\n", pos+1,

I'd rather use the '%zu' modifier here. On 32 Bit systems the size_t
might be a simple int and not a long int which also leads to warnings.

Andreas

>  		      ints[pos]);
>  		/*
>  		 * all vectors except the 6'th one must contain valid
> 

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

* [U-Boot] [PATCH 1/2] tools/atmelimage.c: Fix warning when debug is enabled
  2015-08-27 10:37 ` [U-Boot] [PATCH 1/2] tools/atmelimage.c: Fix warning when debug is enabled Andreas Bießmann
@ 2015-08-27 11:26   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2015-08-27 11:26 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 27, 2015 at 12:37:52PM +0200, Andreas Bie?mann wrote:
> Hi Tom,
> 
> On 08/26/2015 09:21 PM, Tom Rini wrote:
> > Otherwise we get:
> > tools/atmelimage.c:134:3: warning: format ?%d? expects argument of type ?int?, but argument 2 has type ?size_t? [-Wformat=]
> > debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1,
> > ^
> > 
> > Signed-off-by: Tom Rini <trini@konsulko.com>
> > ---
> >  tools/atmelimage.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/atmelimage.c b/tools/atmelimage.c
> > index 5b72ac5..0979eef 100644
> > --- a/tools/atmelimage.c
> > +++ b/tools/atmelimage.c
> > @@ -131,7 +131,7 @@ static int atmel_verify_header(unsigned char *ptr, int image_size,
> >  
> >  	/* check the seven interrupt vectors of binary */
> >  	for (pos = 0; pos < 7; pos++) {
> > -		debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1,
> > +		debug("atmelimage: interrupt vector #%ld is 0x%08X\n", pos+1,
> 
> I'd rather use the '%zu' modifier here. On 32 Bit systems the size_t
> might be a simple int and not a long int which also leads to warnings.

Oh that's right, %zu is what you should do for size_t.  I thought I was
doing something wrong but couldn't recall.  Thanks, I'll v2 later today.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150827/297db970/attachment.sig>

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

* [U-Boot] [PATCH v2 1/2] tools/atmelimage.c: Fix warning when debug is enabled
       [not found] ` <1440698088-1152-1-git-send-email-trini@konsulko.com>
@ 2015-08-28  7:20   ` Andreas Bießmann
  2015-08-28 21:05     ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Bießmann @ 2015-08-28  7:20 UTC (permalink / raw)
  To: u-boot

+u-boot ML

On 08/27/2015 07:54 PM, Tom Rini wrote:
> Otherwise we get:
> tools/atmelimage.c:134:3: warning: format ?%d? expects argument of type ?int?, but argument 2 has type ?size_t? [-Wformat=]
> debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1,
> ^
> 
> Cc: Andreas Bie?mann <andreas.devel@googlemail.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>

Reviewed-by: Andreas Bie?mann <andreas.devel@googlemail.com>

> 
> ---
> Changes in v2:
> - Use %zu not %ld as noted by Andreas Bie?mann
> ---
>  tools/atmelimage.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/atmelimage.c b/tools/atmelimage.c
> index 5b72ac5..6b5603e 100644
> --- a/tools/atmelimage.c
> +++ b/tools/atmelimage.c
> @@ -131,7 +131,7 @@ static int atmel_verify_header(unsigned char *ptr, int image_size,
>  
>  	/* check the seven interrupt vectors of binary */
>  	for (pos = 0; pos < 7; pos++) {
> -		debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1,
> +		debug("atmelimage: interrupt vector #%zu is 0x%08X\n", pos+1,
>  		      ints[pos]);
>  		/*
>  		 * all vectors except the 6'th one must contain valid
> 

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

* [U-Boot] [PATCH v2 1/2] tools/atmelimage.c: Fix warning when debug is enabled
  2015-08-28  7:20   ` [U-Boot] [PATCH v2 " Andreas Bießmann
@ 2015-08-28 21:05     ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2015-08-28 21:05 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 28, 2015 at 09:20:18AM +0200, Andreas Bie?mann wrote:

> +u-boot ML
> 
> On 08/27/2015 07:54 PM, Tom Rini wrote:
> > Otherwise we get:
> > tools/atmelimage.c:134:3: warning: format ?%d? expects argument of type ?int?, but argument 2 has type ?size_t? [-Wformat=]
> > debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1,
> > ^
> > 
> > Cc: Andreas Bie?mann <andreas.devel@googlemail.com>
> > Signed-off-by: Tom Rini <trini@konsulko.com>
> 
> Reviewed-by: Andreas Bie?mann <andreas.devel@googlemail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150828/2df6cce4/attachment.sig>

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

* [U-Boot] [U-Boot, 2/2] tools/mkimage.c: Clarify help text for -D slightly
  2015-08-26 19:21 ` [U-Boot] [PATCH 2/2] tools/mkimage.c: Clarify help text for -D slightly Tom Rini
@ 2015-10-12 15:15   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2015-10-12 15:15 UTC (permalink / raw)
  To: u-boot

On Wed, Aug 26, 2015 at 03:21:23PM -0400, Tom Rini wrote:

> Try and make it clear that -D will replace all arguments passed to dtc
> and is not appending them.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151012/42900209/attachment.sig>

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

end of thread, other threads:[~2015-10-12 15:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26 19:21 [U-Boot] [PATCH 1/2] tools/atmelimage.c: Fix warning when debug is enabled Tom Rini
2015-08-26 19:21 ` [U-Boot] [PATCH 2/2] tools/mkimage.c: Clarify help text for -D slightly Tom Rini
2015-10-12 15:15   ` [U-Boot] [U-Boot, " Tom Rini
2015-08-27 10:37 ` [U-Boot] [PATCH 1/2] tools/atmelimage.c: Fix warning when debug is enabled Andreas Bießmann
2015-08-27 11:26   ` Tom Rini
     [not found] ` <1440698088-1152-1-git-send-email-trini@konsulko.com>
2015-08-28  7:20   ` [U-Boot] [PATCH v2 " Andreas Bießmann
2015-08-28 21:05     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox