From f94075c3c52aa7e1174d604c806a810d0305378b Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 14 Oct 2018 11:23:17 -0400 Subject: [PATCH] freedreno/msm: fix c90 warning Wasn't really sure how to switch the silly -Wdeclaration-after-statement flag off on a per directory basis. So make the code uglier instead. --- freedreno/msm/msm_ringbuffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freedreno/msm/msm_ringbuffer.c b/freedreno/msm/msm_ringbuffer.c index 594c2ba9..475c65d7 100644 --- a/freedreno/msm/msm_ringbuffer.c +++ b/freedreno/msm/msm_ringbuffer.c @@ -486,6 +486,7 @@ static int msm_ringbuffer_flush(struct fd_ringbuffer *ring, uint32_t *last_start for (i = 0; i < msm_ring->submit.nr_cmds; i++) { struct msm_cmd *msm_cmd = msm_ring->cmds[i]; struct drm_msm_gem_submit_reloc *relocs = msm_cmd->relocs; + struct drm_msm_gem_submit_cmd *cmd; unsigned nr_relocs = msm_cmd->nr_relocs; /* for reusable stateobjs, the reloc table has reloc_idx that @@ -499,7 +500,7 @@ static int msm_ringbuffer_flush(struct fd_ringbuffer *ring, uint32_t *last_start relocs, nr_relocs); } - struct drm_msm_gem_submit_cmd *cmd = &msm_ring->submit.cmds[i]; + cmd = &msm_ring->submit.cmds[i]; cmd->relocs = VOID2U64(relocs); cmd->nr_relocs = nr_relocs; }