drm/radeon/r600: fix warnings in CS checker
authorAlex Deucher <alexdeucher@gmail.com>
Tue, 16 Feb 2010 16:28:36 +0000 (11:28 -0500)
committerDave Airlie <airlied@redhat.com>
Thu, 18 Feb 2010 04:20:58 +0000 (14:20 +1000)
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

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r600_cs.c

index 00e69c585fbf4e2dbcb29daddf08782fd27eb53a..cd2c63bce50172f6136dbeb64abfe69254e2d122 100644 (file)
@@ -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 */