* Re: [PATCH] ARM: omap2: gpmc: fix compilation warning [not found] <1367839093-13033-1-git-send-email-v-stehle@ti.com> @ 2013-05-08 22:26 ` Tony Lindgren 2013-05-14 17:20 ` [PATCH, v2] " Vincent Stehlé 0 siblings, 1 reply; 4+ messages in thread From: Tony Lindgren @ 2013-05-08 22:26 UTC (permalink / raw) To: Vincent Stehlé; +Cc: linux-omap, linux-kernel, trivial * Vincent Stehlé <v-stehle@ti.com> [130506 04:24]: > 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 > --- > arch/arm/mach-omap2/gpmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c > index ed946df..3cd7074 100644 > --- a/arch/arm/mach-omap2/gpmc.c > +++ b/arch/arm/mach-omap2/gpmc.c > @@ -1474,7 +1474,7 @@ 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); > + cs, (unsigned)res.start); > goto err; > } You should just change the format for dev_err instead of the casting. Regards, Tony ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH, v2] ARM: omap2: gpmc: fix compilation warning 2013-05-08 22:26 ` [PATCH] ARM: omap2: gpmc: fix compilation warning Tony Lindgren @ 2013-05-14 17:20 ` Vincent Stehlé 2013-05-16 17:39 ` Tony Lindgren 0 siblings, 1 reply; 4+ messages in thread From: Vincent Stehlé @ 2013-05-14 17:20 UTC (permalink / raw) To: Tony Lindgren; +Cc: linux-omap, linux-kernel, Vincent Stehlé, trivial 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH, v2] ARM: omap2: gpmc: fix compilation warning 2013-05-14 17:20 ` [PATCH, v2] " Vincent Stehlé @ 2013-05-16 17:39 ` Tony Lindgren 0 siblings, 0 replies; 4+ messages in thread From: Tony Lindgren @ 2013-05-16 17:39 UTC (permalink / raw) To: Vincent Stehlé Cc: linux-omap, linux-kernel, Vincent Stehlé, trivial * Vincent Stehlé <vincent.stehle@laposte.net> [130514 10:26]: > 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? Oh OK. In this case the GPMC is always within the 32-bit address space. But considering that similar issue will be there for other code with LPAE, how about add something generic to arch/arm/include/asm/io.h like: #define PHYS_ADDR32(x) ((__force u32)(x)) #define PHYS_ADDR64(x) ((__force u64)(x)) Or maybe something like that already exists. Regards, Tony > 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, v2] ARM: omap2: gpmc: fix compilation warning @ 2013-05-16 17:39 ` Tony Lindgren 0 siblings, 0 replies; 4+ messages in thread From: Tony Lindgren @ 2013-05-16 17:39 UTC (permalink / raw) To: Vincent Stehlé Cc: linux-omap, linux-kernel, Vincent Stehlé, trivial * Vincent Stehlé <vincent.stehle@laposte.net> [130514 10:26]: > 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? Oh OK. In this case the GPMC is always within the 32-bit address space. But considering that similar issue will be there for other code with LPAE, how about add something generic to arch/arm/include/asm/io.h like: #define PHYS_ADDR32(x) ((__force u32)(x)) #define PHYS_ADDR64(x) ((__force u64)(x)) Or maybe something like that already exists. Regards, Tony > 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 > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-16 17:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1367839093-13033-1-git-send-email-v-stehle@ti.com>
2013-05-08 22:26 ` [PATCH] ARM: omap2: gpmc: fix compilation warning Tony Lindgren
2013-05-14 17:20 ` [PATCH, v2] " Vincent Stehlé
2013-05-16 17:39 ` Tony Lindgren
2013-05-16 17:39 ` Tony Lindgren
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.