* [PATCH] x86_64: use UL on TASK_SIZE
@ 2005-01-23 6:56 Randy.Dunlap
2005-01-23 10:59 ` Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: Randy.Dunlap @ 2005-01-23 6:56 UTC (permalink / raw)
To: lkml; +Cc: akpm, ak
Use UL on large constant (kills 3214 sparse warnings :)
include/linux/sched.h:1150:18: warning: constant 0x800000000000 is so big it is long
Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
diffstat:=
include/asm-x86_64/processor.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -Naurp ./include/asm-x86_64/processor.h~proc_task_size ./include/asm-x86_64/processor.h
--- ./include/asm-x86_64/processor.h~proc_task_size 2005-01-22 19:06:33.765150024 -0800
+++ ./include/asm-x86_64/processor.h 2005-01-22 21:40:48.884158072 -0800
@@ -162,7 +162,7 @@ static inline void clear_in_cr4 (unsigne
/*
* User space process size. 47bits.
*/
-#define TASK_SIZE (0x800000000000)
+#define TASK_SIZE (0x800000000000UL)
/* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86_64: use UL on TASK_SIZE
2005-01-23 6:56 [PATCH] x86_64: use UL on TASK_SIZE Randy.Dunlap
@ 2005-01-23 10:59 ` Andi Kleen
2005-01-23 18:16 ` Randy.Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2005-01-23 10:59 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: lkml, akpm, ak
On Sat, Jan 22, 2005 at 10:56:17PM -0800, Randy.Dunlap wrote:
>
> Use UL on large constant (kills 3214 sparse warnings :)
>
> include/linux/sched.h:1150:18: warning: constant 0x800000000000 is so big it is long
Sounds more like a sparse bug to me. The C99 standard says the type
of the constant is the first in which the constant can be represented.
And that list includes unsigned long and even unsigned long long.
-Andi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86_64: use UL on TASK_SIZE
2005-01-23 10:59 ` Andi Kleen
@ 2005-01-23 18:16 ` Randy.Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: Randy.Dunlap @ 2005-01-23 18:16 UTC (permalink / raw)
To: Andi Kleen; +Cc: lkml, akpm
Andi Kleen wrote:
> On Sat, Jan 22, 2005 at 10:56:17PM -0800, Randy.Dunlap wrote:
>
>>Use UL on large constant (kills 3214 sparse warnings :)
>>
>>include/linux/sched.h:1150:18: warning: constant 0x800000000000 is so big it is long
>
>
> Sounds more like a sparse bug to me. The C99 standard says the type
> of the constant is the first in which the constant can be represented.
> And that list includes unsigned long and even unsigned long long.
Thanks, I'll take it up on the sparse m-l.
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-01-23 18:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-23 6:56 [PATCH] x86_64: use UL on TASK_SIZE Randy.Dunlap
2005-01-23 10:59 ` Andi Kleen
2005-01-23 18:16 ` Randy.Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox