From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Eric Anholt <eric@anholt.net>, David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drm/pl111: Use 64-bit arithmetic instead of 32-bit
Date: Tue, 17 Jul 2018 14:52:01 -0500 [thread overview]
Message-ID: <50bd281d-ddfd-4b37-2d0e-6a02985048a4@embeddedor.com> (raw)
In-Reply-To: <87d0vlg0zc.fsf@anholt.net>
Hi Eric,
On 07/17/2018 01:40 PM, Eric Anholt wrote:
> "Gustavo A. R. Silva" <gustavo@embeddedor.com> writes:
>
>> Add suffix ULL to constant 1000 in order to give the compiler complete
>> information about the proper arithmetic to use.
>>
>> Notice that such constant is used in a context that expects an
>> expression of type u64 (64 bits, unsigned) and the following
>> expression is currently being evaluated using 32-bit arithmetic:
>>
>> mode->clock * 1000
>>
>> Addresses-Coverity-ID: 1466139 ("Unintentional integer overflow")
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>
> This is silly. The clock won't be over 4ghz -- we haven't seen anything
> over 1024x768 on this hardware as far as I know. The u64 is for the
> multiplication by width/height below.
>
Yep. I understand. That's why I didn't use the word *fix* anywhere in
the changelog.
> I've still applied the patch to shut up the tool.
>
Thanks
--
Gustavo
prev parent reply other threads:[~2018-07-17 19:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 14:22 Gustavo A. R. Silva
2018-07-17 18:40 ` Eric Anholt
2018-07-17 19:52 ` Gustavo A. R. Silva [this message]
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=50bd281d-ddfd-4b37-2d0e-6a02985048a4@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®