Skip to content

Commit

Permalink
drm: zte: fix static checker warning on variable 'fmt'
Browse files Browse the repository at this point in the history
Commit 4e986d3 ("drm: zte: add overlay plane support") introduces
the following static checker warning:

 drivers/gpu/drm/zte/zx_plane.c:170 zx_vl_rsz_setup()
 warn: always true condition '(fmt >= 0) => (0-u32max >= 0)'

Fix it by change 'fmt' type to integer.

Reported-by: Dan Carpenter <[email protected]>
Fixes: 4e986d3 ("drm: zte: add overlay plane support")
Signed-off-by: Shawn Guo <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
shawnguo2 committed Feb 23, 2017
1 parent 2220fc1 commit dc5e1d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/zte/zx_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static void zx_vl_rsz_setup(struct zx_plane *zplane, uint32_t format,
void __iomem *rsz = zplane->rsz;
u32 src_chroma_w = src_w;
u32 src_chroma_h = src_h;
u32 fmt;
int fmt;

/* Set up source and destination resolution */
zx_writel(rsz + RSZ_SRC_CFG, RSZ_VER(src_h - 1) | RSZ_HOR(src_w - 1));
Expand Down Expand Up @@ -203,7 +203,7 @@ static void zx_vl_plane_atomic_update(struct drm_plane *plane,
u32 src_x, src_y, src_w, src_h;
u32 dst_x, dst_y, dst_w, dst_h;
uint32_t format;
u32 fmt;
int fmt;
int num_planes;
int i;

Expand Down

0 comments on commit dc5e1d6

Please sign in to comment.