lkml.org 
[lkml]   [2008]   [May]   [2]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 01 May 2008 21:31:41 -0700
From"H. Peter Anvin" <>
SubjectRe: kernel/time.c: integer constant is too large for long type
Carlos R. Mafra wrote:
> Hi Peter,
> 
> I would like to report a gcc warning which caught my attention today:
> 
> kernel/time.c: In function msecs_to_jiffies:
> kernel/time.c:479: warning: integer constant is too large for long type
> kernel/time.c: In function usecs_to_jiffies:
> kernel/time.c:494: warning: integer constant is too large for long type
> 
> and ask you if this is something I should worry about (and propose
> a patch if this warning is harmless).
> 
> I ask this because this warning was introduced via commit 
> bdc807871d58285737d50dc6163d0feb72cb0dc2 ("avoid overflows in kernel/time.c")
> and (naively) for me it looks like the above gcc warning is some kind of 
> overflow.
> 

Hi there,

The code is correct if a bit subtle.  I have put a fix of it as part of 
a larger patch series at:

git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes.git

Your patch is simpler, so if Linus doesn't take the patch series this 
window we should push your patch after the window closes.

	-hpa


\
 
 \ /
  Last update: 2008-05-02 06:37    [from the cache]
©2003-2008