From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 30718] New: evergreen.c bad cast/shift
Date: Fri, 8 Oct 2010 17:01:37 -0700 (PDT)
Message-ID:
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Return-path:
Received: from annarchy.freedesktop.org (annarchy.freedesktop.org
[131.252.210.176])
by gabe.freedesktop.org (Postfix) with ESMTP id EC5FB9E78F
for ;
Fri, 8 Oct 2010 17:01:37 -0700 (PDT)
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org
Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org
To: dri-devel@lists.freedesktop.org
List-Id: dri-devel@lists.freedesktop.org
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.