public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] debug warning
Date: Wed, 15 Jul 2015 22:23:34 +0200	[thread overview]
Message-ID: <20150715222334.00f2ddca@lilith> (raw)
In-Reply-To: <55A6BC3F.9010003@freescale.com>

Hello York,

On Wed, 15 Jul 2015 13:02:07 -0700, York Sun <yorksun@freescale.com>
wrote:
> Simon,
> 
> Did it happen to you with this warning?
> 
> lib/fdtdec.c:108:4: warning: format ?%x? expects argument of type ?unsigned
> int?, but argument 3 has type ?fdt_size_t? [-Wformat=]
>     debug("addr=%08lx, size=%08x\n",
>     ^
> 
> I think when we have 64-bit physical address, as defined in fdtdec.h, this debug
> statement needs to be changed. I am thinking to change the typedef fdt_addr_t to
> phys_addr_t, and fdt_size_t to phys_size_t. What do you say?

I say there is no reason to change a type just because a printf format
specifier is wrong for it when building for 64-bit.

Is there a rationale apart from the format specifier error?

If not, then What should be done is fix the specifier so that it is
correct in both 32 and 64 bits.

Amicalement,
-- 
Albert.

  reply	other threads:[~2015-07-15 20:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15 20:02 [U-Boot] debug warning York Sun
2015-07-15 20:23 ` Albert ARIBAUD [this message]
2015-07-15 20:25   ` York Sun
2015-07-15 20:29     ` Simon Glass
2015-07-15 20:32       ` York Sun
2015-07-16  6:54         ` Albert ARIBAUD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150715222334.00f2ddca@lilith \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox