* [PATCH] powerpc: Fix integer constant warning
@ 2010-06-07 20:49 Steve Best
2010-06-08 13:12 ` David Howells
0 siblings, 1 reply; 5+ messages in thread
From: Steve Best @ 2010-06-07 20:49 UTC (permalink / raw)
To: linuxppc-dev, sfbest; +Cc: Steve Best
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>
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 {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: Fix integer constant warning
2010-06-07 20:49 [PATCH] powerpc: Fix integer constant warning Steve Best
@ 2010-06-08 13:12 ` David Howells
2010-06-08 13:55 ` Josh Boyer
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: David Howells @ 2010-06-08 13:12 UTC (permalink / raw)
To: Steve Best; +Cc: linuxppc-dev
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: Fix integer constant warning
2010-06-08 13:12 ` David Howells
@ 2010-06-08 13:55 ` Josh Boyer
2010-06-08 14:23 ` David Howells
2010-06-09 11:50 ` Steve Best
2 siblings, 0 replies; 5+ messages in thread
From: Josh Boyer @ 2010-06-08 13:55 UTC (permalink / raw)
To: David Howells; +Cc: linuxppc-dev, Steve Best
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: Fix integer constant warning
2010-06-08 13:12 ` David Howells
2010-06-08 13:55 ` Josh Boyer
@ 2010-06-08 14:23 ` David Howells
2010-06-09 11:50 ` Steve Best
2 siblings, 0 replies; 5+ messages in thread
From: David Howells @ 2010-06-08 14:23 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, Steve Best
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: Fix integer constant warning
2010-06-08 13:12 ` David Howells
2010-06-08 13:55 ` Josh Boyer
2010-06-08 14:23 ` David Howells
@ 2010-06-09 11:50 ` Steve Best
2 siblings, 0 replies; 5+ messages in thread
From: Steve Best @ 2010-06-09 11:50 UTC (permalink / raw)
To: David Howells; +Cc: linuxppc-dev
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-09 11:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-07 20:49 [PATCH] powerpc: Fix integer constant warning Steve Best
2010-06-08 13:12 ` David Howells
2010-06-08 13:55 ` Josh Boyer
2010-06-08 14:23 ` David Howells
2010-06-09 11:50 ` Steve Best
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.