* [Bug 30718] New: evergreen.c bad cast/shift
@ 2010-10-09 0:01 bugzilla-daemon
2010-10-11 16:42 ` [Bug 30718] " bugzilla-daemon
0 siblings, 1 reply; 2+ messages in thread
From: bugzilla-daemon @ 2010-10-09 0:01 UTC (permalink / raw)
To: dri-devel
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug 30718] evergreen.c bad cast/shift
2010-10-09 0:01 [Bug 30718] New: evergreen.c bad cast/shift bugzilla-daemon
@ 2010-10-11 16:42 ` bugzilla-daemon
0 siblings, 0 replies; 2+ messages in thread
From: bugzilla-daemon @ 2010-10-11 16:42 UTC (permalink / raw)
To: dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=30718
Alex Deucher <agd5f@yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Alex Deucher <agd5f@yahoo.com> 2010-10-11 09:42:42 PDT ---
good catch. I've sent Dave a patch:
http://lists.freedesktop.org/archives/dri-devel/2010-October/004705.html
Thanks!
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-11 16:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-09 0:01 [Bug 30718] New: evergreen.c bad cast/shift bugzilla-daemon
2010-10-11 16:42 ` [Bug 30718] " bugzilla-daemon
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.