setup_64.c:450: warning: format '%lx' expects type 'long unsigned int'

Geert Uytterhoeven Geert.Uytterhoeven at sonycom.com
Wed Feb 18 00:21:15 EST 2009


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 at 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



More information about the Linuxppc-dev mailing list