From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 30718] New: evergreen.c bad cast/shift
Date: Fri, 8 Oct 2010 17:01:37 -0700 (PDT) [thread overview]
Message-ID: <bug-30718-502@http.bugs.freedesktop.org/> (raw)
https://bugs.freedesktop.org/show_bug.cgi?id=30718
Summary: evergreen.c bad cast/shift
Product: DRI
Version: unspecified
Platform: Other
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: DRM/Radeon
AssignedTo: dri-devel@lists.freedesktop.org
ReportedBy: freedesktop@treblig.org
Hi,
Sparse spotted the following and it does look like the wrong order of cast
and shift:
drivers/gpu/drm/radeon/evergreen.c:1140:78: warning: right shift by bigger than
source value
efuse_box_bit_127_124 = (u8)(efuse_straps_3 & 0xF0000000) >>
28;
I think I agree with it that in that the value is truncated to u8 before being
shifted down by 28 and therefore always being 0. So easiest fix I guess is:
efuse_box_bit_127_124 = (u8)((efuse_straps_3 & 0xF0000000)
>>28);
Not sure what the effect of this would be, it seems to be in some very device
specific code.
Dave
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
next reply other threads:[~2010-10-09 0:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 0:01 bugzilla-daemon [this message]
2010-10-11 16:42 ` [Bug 30718] evergreen.c bad cast/shift bugzilla-daemon
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=bug-30718-502@http.bugs.freedesktop.org/ \
--to=bugzilla-daemon@freedesktop.org \
--cc=dri-devel@lists.freedesktop.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.