Skip to contentSkip to conversation

kernel/time.c: integer constant is too large for 'long' type warnings

DISCUSSION Gabriel C 2 participants 2 messages Apr 4, 2008

lore
Share & tools
lore

Gabriel C

author
#0 lore raw

Hi,

with CONFIG_HZ_300=y I see these warnings :

...

kernel/time.c: In function 'msecs_to_jiffies':
kernel/time.c:472: warning: integer constant is too large for 'long' type kernel/time.c: In function 'usecs_to_jiffies':
kernel/time.c:487: warning: integer constant is too large for 'long' type

...

I think this was introduced by :

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=bdc807871d58285737d50dc6163d0feb72cb0dc2

If you need more infos let me know.

Regards,

Gabriel

#1 lore raw
Quoted 4 lines · Gabriel C

Hi,

with CONFIG_HZ_300=y I see these warnings :

Quoted 8 lines

kernel/time.c: In function 'msecs_to_jiffies': kernel/time.c:472: warning: integer constant is too large for 'long' type kernel/time.c: In function 'usecs_to_jiffies': kernel/time.c:487: warning: integer constant is too large for 'long' type

I think this was introduced by :

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=bdc807871d58285737d50dc6163d0feb72cb0dc2

If you need more infos let me know.

There is a patch for this, already, but the bikeshed painters have been whining about it.

The code is correct; it is a nuisance warning only.

-hpa