* setup_64.c:450: warning: format '%lx' expects type 'long unsigned int'
@ 2009-02-17 13:21 Geert Uytterhoeven
2009-02-18 6:03 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2009-02-17 13:21 UTC (permalink / raw)
To: Linux/PPC Development
With CONFIG_RELOCATABLE=y, I get for PS3:
| arch/powerpc/kernel/setup_64.c:450: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'phys_addr_t'
as phys_addr_t is u64 on ppc64, while u64 is now `unsigned long long'.
Unfortunately just changing the format string is not sufficient, due to:
| #if defined(CONFIG_RELOCATABLE)
| #ifndef __ASSEMBLY__
|
| extern phys_addr_t memstart_addr;
| extern phys_addr_t kernstart_addr;
| #endif
| #define PHYSICAL_START kernstart_addr
| #else
| #define PHYSICAL_START ASM_CONST(CONFIG_PHYSICAL_START)
| #endif
and ASM_CONST() appends "UL" to the constant.
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: setup_64.c:450: warning: format '%lx' expects type 'long unsigned int'
2009-02-17 13:21 setup_64.c:450: warning: format '%lx' expects type 'long unsigned int' Geert Uytterhoeven
@ 2009-02-18 6:03 ` Benjamin Herrenschmidt
2009-02-18 6:16 ` Stephen Rothwell
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-18 6:03 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux/PPC Development
On Tue, 2009-02-17 at 14:21 +0100, Geert Uytterhoeven wrote:
> and ASM_CONST() appends "UL" to the constant.
>
We probably want to add a ASM_ULL_CONST() for that...
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: setup_64.c:450: warning: format '%lx' expects type 'long unsigned int'
2009-02-18 6:03 ` Benjamin Herrenschmidt
@ 2009-02-18 6:16 ` Stephen Rothwell
2009-02-18 6:18 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2009-02-18 6:16 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Geert Uytterhoeven, Linux/PPC, Development
[-- Attachment #1: Type: text/plain, Size: 472 bytes --]
On Wed, 18 Feb 2009 17:03:50 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> On Tue, 2009-02-17 at 14:21 +0100, Geert Uytterhoeven wrote:
> > and ASM_CONST() appends "UL" to the constant.
> >
> We probably want to add a ASM_ULL_CONST() for that...
Except physaddr_t is sometimes 32 bits and sometime 64 bits in the 32 bit
kernel ...
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: setup_64.c:450: warning: format '%lx' expects type 'long unsigned int'
2009-02-18 6:16 ` Stephen Rothwell
@ 2009-02-18 6:18 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-18 6:18 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Geert Uytterhoeven, Linux/PPC Development
On Wed, 2009-02-18 at 17:16 +1100, Stephen Rothwell wrote:
> On Wed, 18 Feb 2009 17:03:50 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > On Tue, 2009-02-17 at 14:21 +0100, Geert Uytterhoeven wrote:
> > > and ASM_CONST() appends "UL" to the constant.
> > >
> > We probably want to add a ASM_ULL_CONST() for that...
>
> Except physaddr_t is sometimes 32 bits and sometime 64 bits in the 32 bit
> kernel ...
Oh well, one cast that won't go away then.
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-02-18 6:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-17 13:21 setup_64.c:450: warning: format '%lx' expects type 'long unsigned int' Geert Uytterhoeven
2009-02-18 6:03 ` Benjamin Herrenschmidt
2009-02-18 6:16 ` Stephen Rothwell
2009-02-18 6:18 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).