amdgpu: Move union declaration to top of amdgpu_cs_ctx_override_priority

Avoids compiler warning:

../../amdgpu/amdgpu_cs.c: In function 'amdgpu_cs_ctx_override_priority':
../../amdgpu/amdgpu_cs.c:155:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  union drm_amdgpu_sched args;
  ^~~~~

Reviewed-by: Christian König <christian.koenig@amd.com>
main
Michel Dänzer 2019-06-20 10:42:10 +02:00 committed by Michel Dänzer
parent 8849aa87fb
commit e246114c46
1 changed files with 1 additions and 1 deletions

View File

@ -147,12 +147,12 @@ drm_public int amdgpu_cs_ctx_override_priority(amdgpu_device_handle dev,
int master_fd, int master_fd,
unsigned priority) unsigned priority)
{ {
union drm_amdgpu_sched args;
int r; int r;
if (!dev || !context || master_fd < 0) if (!dev || !context || master_fd < 0)
return -EINVAL; return -EINVAL;
union drm_amdgpu_sched args;
memset(&args, 0, sizeof(args)); memset(&args, 0, sizeof(args));
args.in.op = AMDGPU_SCHED_OP_CONTEXT_PRIORITY_OVERRIDE; args.in.op = AMDGPU_SCHED_OP_CONTEXT_PRIORITY_OVERRIDE;