From: "H. Peter Anvin" <hpa@zytor.com>
To: hpa@zytor.com, linux-kernel@vger.kernel.org
Subject: Re: kernel/time.c: integer constant is too large for long type
Date: Thu, 01 May 2008 21:31:41 -0700 [thread overview]
Message-ID: <481A992D.4070807@zytor.com> (raw)
In-Reply-To: <20080502024636.GA31465@beyonder.ift.unesp.br>
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
next prev parent reply other threads:[~2008-05-02 4:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-02 2:46 kernel/time.c: integer constant is too large for long type Carlos R. Mafra
2008-05-02 4:31 ` H. Peter Anvin [this message]
2008-05-02 4:45 ` H. Peter Anvin
2008-05-02 12:47 ` Carlos R. Mafra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=481A992D.4070807@zytor.com \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.