projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2220fc1
)
drm: zte: fix static checker warning on variable 'fmt'
author
Shawn Guo
<shawn.guo@linaro.org>
Mon, 20 Feb 2017 13:49:11 +0000
(21:49 +0800)
committer
Shawn Guo
<shawn.guo@linaro.org>
Thu, 23 Feb 2017 00:54:15 +0000
(08:54 +0800)
Commit
4e986d3705df
("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 <dan.carpenter@oracle.com>
Fixes:
4e986d3705df
("drm: zte: add overlay plane support")
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Link:
http://patchwork.freedesktop.org/patch/msgid/1487598551-28310-1-git-send-email-shawnguo@kernel.org
drivers/gpu/drm/zte/zx_plane.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/zte/zx_plane.c
b/drivers/gpu/drm/zte/zx_plane.c
index 1d08ba381098e5f905be122a926ba5e8cf0b00fe..d646ac931663e767345eed0586e0d6862988fda8 100644
(file)
--- a/
drivers/gpu/drm/zte/zx_plane.c
+++ b/
drivers/gpu/drm/zte/zx_plane.c
@@
-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));
@@
-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;