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.
main
Rob Clark 2018-10-14 11:23:17 -04:00
parent b730f5c8c5
commit f94075c3c5
1 changed files with 2 additions and 1 deletions

View File

@ -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++) { for (i = 0; i < msm_ring->submit.nr_cmds; i++) {
struct msm_cmd *msm_cmd = msm_ring->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_reloc *relocs = msm_cmd->relocs;
struct drm_msm_gem_submit_cmd *cmd;
unsigned nr_relocs = msm_cmd->nr_relocs; unsigned nr_relocs = msm_cmd->nr_relocs;
/* for reusable stateobjs, the reloc table has reloc_idx that /* 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); 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->relocs = VOID2U64(relocs);
cmd->nr_relocs = nr_relocs; cmd->nr_relocs = nr_relocs;
} }