AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH libdrm 1/2] amdgpu: Move union declaration to top of amdgpu_cs_ctx_override_priority
Date: Mon, 24 Jun 2019 17:45:34 +0200	[thread overview]
Message-ID: <20190624154535.8619-2-michel@daenzer.net> (raw)
In-Reply-To: <20190624154535.8619-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>

From: Michel Dänzer <michel.daenzer@amd.com>

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;
  ^~~~~

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 amdgpu/amdgpu_cs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c
index 977fa3cf..20d5aef2 100644
--- a/amdgpu/amdgpu_cs.c
+++ b/amdgpu/amdgpu_cs.c
@@ -147,12 +147,12 @@ drm_public int amdgpu_cs_ctx_override_priority(amdgpu_device_handle dev,
                                                int master_fd,
                                                unsigned priority)
 {
+	union drm_amdgpu_sched args;
 	int r;
 
 	if (!dev || !context || master_fd < 0)
 		return -EINVAL;
 
-	union drm_amdgpu_sched args;
 	memset(&args, 0, sizeof(args));
 
 	args.in.op = AMDGPU_SCHED_OP_CONTEXT_PRIORITY_OVERRIDE;
-- 
2.20.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2019-06-24 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 15:45 [PATCH libdrm 0/2] amdgpu: Minor cleanups Michel Dänzer
     [not found] ` <20190624154535.8619-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2019-06-24 15:45   ` Michel Dänzer [this message]
2019-06-24 15:45   ` [PATCH libdrm 2/2] amdgpu: Update amdgpu_bo_handle_type_kms_noimport documentation Michel Dänzer
2019-06-24 17:10   ` [PATCH libdrm 0/2] amdgpu: Minor cleanups Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190624154535.8619-2-michel@daenzer.net \
    --to=michel-otuistvhuppr7s880joybq@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox