From: "Vincent Stehlé" <vincent.stehle@laposte.net>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
"Vincent Stehlé" <v-stehle@ti.com>,
trivial@kernel.org
Subject: [PATCH, v2] ARM: omap2: gpmc: fix compilation warning
Date: Tue, 14 May 2013 19:20:43 +0200 [thread overview]
Message-ID: <1368552043-3764-1-git-send-email-vincent.stehle@laposte.net> (raw)
In-Reply-To: <20130508222639.GM32546@atomide.com>
From: Vincent Stehlé <v-stehle@ti.com>
Fix the following compilation warning:
arch/arm/mach-omap2/gpmc.c: In function 'gpmc_probe_generic_child':
arch/arm/mach-omap2/gpmc.c:1477:4: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' [-Wformat]
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Cc: trivial@kernel.org
---
Tony wrote:
> You should just change the format for dev_err instead of the casting.
Hi,
Sorry for the late answer; it seems this is a bit more complicated after all,
as res.start can be 32b or 64b in LPAE. The common solution seems to be: cast
to long long in all cases and print accordingly. Would you like this better?
Best regards,
V.
arch/arm/mach-omap2/gpmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 6c4da12..e74501e 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1473,8 +1473,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
*/
ret = gpmc_cs_remap(cs, res.start);
if (ret < 0) {
- dev_err(&pdev->dev, "cannot remap GPMC CS %d to 0x%x\n",
- cs, res.start);
+ dev_err(&pdev->dev, "cannot remap GPMC CS %d to 0x%llx\n",
+ cs, (long long)res.start);
goto err;
}
--
1.7.10.4
next prev parent reply other threads:[~2013-05-14 17:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1367839093-13033-1-git-send-email-v-stehle@ti.com>
2013-05-08 22:26 ` [PATCH] " Tony Lindgren
2013-05-14 17:20 ` Vincent Stehlé [this message]
2013-05-16 17:39 ` [PATCH, v2] " Tony Lindgren
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=1368552043-3764-1-git-send-email-vincent.stehle@laposte.net \
--to=vincent.stehle@laposte.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
--cc=trivial@kernel.org \
--cc=v-stehle@ti.com \
/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
all inboxes | Powered by JetHome®