aboutsummaryrefslogtreecommitdiffstats
path: root/exynos
diff options
context:
space:
mode:
authorTobias Jakobi2015-03-16 17:19:28 -0500
committerEmil Velikov2015-03-16 17:21:03 -0500
commit736d6a1f0f8292fe3f3d0b38f5d69b8693767537 (patch)
treeae3d2f5fba719895702ea280d8e3ac79146ca89f /exynos
parent89037326ca6012ba18be29dc6587e11617164400 (diff)
downloadexternal-libgbm-736d6a1f0f8292fe3f3d0b38f5d69b8693767537.tar.gz
external-libgbm-736d6a1f0f8292fe3f3d0b38f5d69b8693767537.tar.xz
external-libgbm-736d6a1f0f8292fe3f3d0b38f5d69b8693767537.zip
exynos: use structure initialization instead of memset
Keeps the code cleaner, since the structs have to be initialized once anyway. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Inki Dae <inki.dae@samsung.com> Tested-by: Joonyoung Shim <jy0922.shim@samsung.com> [evelikov: squash trivial conflict] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Conflicts: tests/exynos/exynos_fimg2d_test.c
Diffstat (limited to 'exynos')
-rw-r--r--exynos/exynos_fimg2d.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 5f9e9a71..aecd1c3a 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -188,7 +188,7 @@ static void g2d_reset(struct g2d_context *ctx)
188static int g2d_flush(struct g2d_context *ctx) 188static int g2d_flush(struct g2d_context *ctx)
189{ 189{
190 int ret; 190 int ret;
191 struct drm_exynos_g2d_set_cmdlist cmdlist; 191 struct drm_exynos_g2d_set_cmdlist cmdlist = {0};
192 192
193 if (ctx->cmd_nr == 0 && ctx->cmd_buf_nr == 0) 193 if (ctx->cmd_nr == 0 && ctx->cmd_buf_nr == 0)
194 return -1; 194 return -1;
@@ -198,8 +198,6 @@ static int g2d_flush(struct g2d_context *ctx)
198 return -EINVAL; 198 return -EINVAL;
199 } 199 }
200 200
201 memset(&cmdlist, 0, sizeof(struct drm_exynos_g2d_set_cmdlist));
202
203 cmdlist.cmd = (uint64_t)(uintptr_t)&ctx->cmd[0]; 201 cmdlist.cmd = (uint64_t)(uintptr_t)&ctx->cmd[0];
204 cmdlist.cmd_buf = (uint64_t)(uintptr_t)&ctx->cmd_buf[0]; 202 cmdlist.cmd_buf = (uint64_t)(uintptr_t)&ctx->cmd_buf[0];
205 cmdlist.cmd_nr = ctx->cmd_nr; 203 cmdlist.cmd_nr = ctx->cmd_nr;