Message ID | 20100607203957.23695.97675.sendpatchset@squad5-lp1.lab.bos.redhat.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Benjamin Herrenschmidt |
Headers | show |
Steve Best <sfbest@us.ibm.com> wrote: > -#define KERNELBASE (0xc000000000000000) > +#define KERNELBASE (0xc000000000000000ULL) Is this the right fix? The code producing the warning is subtracting 0xc000000000000000 from a 32-bit number: naca = ntohl(*((u_int32_t*) &inbuf[0x0C])) - KERNELBASE; which seems distinctly odd. David
On Tue, Jun 08, 2010 at 02:12:26PM +0100, David Howells wrote: >Steve Best <sfbest@us.ibm.com> wrote: > >> -#define KERNELBASE (0xc000000000000000) >> +#define KERNELBASE (0xc000000000000000ULL) > >Is this the right fix? The code producing the warning is subtracting >0xc000000000000000 from a 32-bit number: It might not matter, since Paul sent a patch to remove this file entirely. josh
Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> It might not matter, since Paul sent a patch to remove this file entirely.
Yeah, I saw that after...
David
On Tue, 2010-06-08 at 14:12 +0100, David Howells wrote: > Steve Best <sfbest@us.ibm.com> wrote: > > > -#define KERNELBASE (0xc000000000000000) > > +#define KERNELBASE (0xc000000000000000ULL) > > Is this the right fix? The code producing the warning is subtracting > 0xc000000000000000 from a 32-bit number: agree this fix needs more work, and can be dropped. Paul has another patch that removes this file, since it is no longer used. I assume we'll go with that patch. > > naca = ntohl(*((u_int32_t*) &inbuf[0x0C])) - KERNELBASE; > > which seems distinctly odd. > > David -Steve
diff -purN linux.2.6.orig/arch/powerpc/boot/addRamDisk.c linux.2.6/arch/powerpc/boot/addRamDisk.c --- linux.2.6.orig/arch/powerpc/boot/addRamDisk.c 2010-06-07 15:20:41.763844095 -0400 +++ linux.2.6/arch/powerpc/boot/addRamDisk.c 2010-06-07 15:27:15.165100339 -0400 @@ -9,7 +9,7 @@ #define ElfHeaderSize (64 * 1024) #define ElfPages (ElfHeaderSize / 4096) -#define KERNELBASE (0xc000000000000000) +#define KERNELBASE (0xc000000000000000ULL) #define _ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1))) struct addr_range {
Fix ppc arch/powerpc/boot/addRamDisk.c:277: warning: integer constant is too large for 'long' type Signed-off-by: Steve Best <sfbest@us.ibm.com>