Skip to contentSkip to conversation

drm/radeon/r600: fix warnings in CS checker

PATCH New Alex Deucher 1 participant 1 message Feb 16, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/r600: fix warnings in CS checker

Quoted 1 line

From c965494a1ac7700a403b38f3a9d8f924d5ec9e60 Mon Sep 17 00:00:00 2001

From: Alex Deucher <[email protected]>
Date: Tue, 16 Feb 2010 11:28:36 -0500
Subject: [PATCH] drm/radeon/r600: fix warnings in CS checker
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

drivers/gpu/drm/radeon/r600_cs.c: In function ‘r600_cs_track_check’:
drivers/gpu/drm/radeon/r600_cs.c:166: warning: ‘bpe’ may be used uninitialized in this function drivers/gpu/drm/radeon/r600_cs.c:166: note: ‘bpe’ was declared here

drivers/gpu/drm/radeon/r600_cs.c: In function ‘r600_cs_parse’:
drivers/gpu/drm/radeon/r600_cs.c:938: warning: ‘bpe’ may be used uninitialized in this function drivers/gpu/drm/radeon/r600_cs.c:938: note: ‘bpe’ was declared here

---
 drivers/gpu/drm/radeon/r600_cs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/r600_cs.c +1 -1
index 00e69c5..cd2c63b 100644
@@ -163,7 +163,7 @@ static void r600_cs_track_init(struct r600_cs_track *track)
 static inline int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
 {
 	struct r600_cs_track *track = p->track;
-	u32 bpe, pitch, slice_tile_max, size, tmp, height;
+	u32 bpe = 0, pitch, slice_tile_max, size, tmp, height;
 	volatile u32 *ib = p->ib->ptr;
 
 	if (G_0280A0_TILE_MODE(track->cb_color_info[i])) {
@@ -935,7 +935,7 @@ static inline int

r600_check_texture_resource(struct radeon_cs_parser *p, u32 i
struct radeon_bo *texture, struct radeon_bo *mipmap)
{
- u32 nfaces, nlevels, blevel, w0, h0, d0, bpe;
+ u32 nfaces, nlevels, blevel, w0, h0, d0, bpe = 0;
u32 word0, word1, l0_size, mipmap_size;

/* on legacy kernel we don't perform advanced check */

Signature · 1 line
1.5.6.3

From c965494a1ac7700a403b38f3a9d8f924d5ec9e60 Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Tue, 16 Feb 2010 11:28:36 -0500
Subject: [PATCH] drm/radeon/r600: fix warnings in CS checker
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

drivers/gpu/drm/radeon/r600_cs.c: In function ‘r600_cs_track_check’:
drivers/gpu/drm/radeon/r600_cs.c:166: warning: ‘bpe’ may be used uninitialized in this function drivers/gpu/drm/radeon/r600_cs.c:166: note: ‘bpe’ was declared here

drivers/gpu/drm/radeon/r600_cs.c: In function ‘r600_cs_parse’:
drivers/gpu/drm/radeon/r600_cs.c:938: warning: ‘bpe’ may be used uninitialized in this function drivers/gpu/drm/radeon/r600_cs.c:938: note: ‘bpe’ was declared here

---
 drivers/gpu/drm/radeon/r600_cs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/r600_cs.c +2 -2
index 00e69c5..cd2c63b 100644
@@ -163,7 +163,7 @@ static void r600_cs_track_init(struct r600_cs_track *track)
 static inline int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
 {
 	struct r600_cs_track *track = p->track;
-	u32 bpe, pitch, slice_tile_max, size, tmp, height;
+	u32 bpe = 0, pitch, slice_tile_max, size, tmp, height;
 	volatile u32 *ib = p->ib->ptr;
 
 	if (G_0280A0_TILE_MODE(track->cb_color_info[i])) {
@@ -935,7 +935,7 @@ static inline int r600_check_texture_resource(struct radeon_cs_parser *p,  u32 i
 						struct radeon_bo *texture,
 						struct radeon_bo *mipmap)
 {
-	u32 nfaces, nlevels, blevel, w0, h0, d0, bpe;
+	u32 nfaces, nlevels, blevel, w0, h0, d0, bpe = 0;
 	u32 word0, word1, l0_size, mipmap_size;
 
 	/* on legacy kernel we don't perform advanced check */
Signature · 1 line
1.5.6.3

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev

--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel