All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, emil.l.velikov@gmail.com
Subject: [PATCH libdrm v2] intel: resolve shadowing warnings
Date: Mon, 31 Aug 2015 19:13:12 +0100	[thread overview]
Message-ID: <1441044792-13906-1-git-send-email-emil.l.velikov@gmail.com> (raw)
In-Reply-To: <1440434060-31347-3-git-send-email-emil.l.velikov@gmail.com>

v2: keep the bo_gem declaration in exec2() within the loop (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 intel/intel_bufmgr_fake.c | 2 +-
 intel/intel_bufmgr_gem.c  | 7 +++----
 intel/intel_decode.c      | 7 ++-----
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/intel/intel_bufmgr_fake.c b/intel/intel_bufmgr_fake.c
index 75387b7..551e05d 100644
--- a/intel/intel_bufmgr_fake.c
+++ b/intel/intel_bufmgr_fake.c
@@ -1460,7 +1460,7 @@ restart:
 	assert(ret == 0);
 
 	if (bufmgr_fake->exec != NULL) {
-		int ret = bufmgr_fake->exec(bo, used, bufmgr_fake->exec_priv);
+		ret = bufmgr_fake->exec(bo, used, bufmgr_fake->exec_priv);
 		if (ret != 0) {
 			pthread_mutex_unlock(&bufmgr_fake->lock);
 			return ret;
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 2723e21..7303903 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -2165,8 +2165,7 @@ drm_intel_gem_bo_exec(drm_intel_bo *bo, int used,
 		drm_intel_gem_dump_validation_list(bufmgr_gem);
 
 	for (i = 0; i < bufmgr_gem->exec_count; i++) {
-		drm_intel_bo *bo = bufmgr_gem->exec_bos[i];
-		drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
+		bo_gem = (drm_intel_bo_gem *) bufmgr_gem->exec_bos[i];
 
 		bo_gem->idle = false;
 
@@ -2260,8 +2259,8 @@ skip_execution:
 		drm_intel_gem_dump_validation_list(bufmgr_gem);
 
 	for (i = 0; i < bufmgr_gem->exec_count; i++) {
-		drm_intel_bo *bo = bufmgr_gem->exec_bos[i];
-		drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *)bo;
+		drm_intel_bo_gem *bo_gem =
+			(drm_intel_bo_gem *) bufmgr_gem->exec_bos[i];
 
 		bo_gem->idle = false;
 
diff --git a/intel/intel_decode.c b/intel/intel_decode.c
index 2b902a3..345d457 100644
--- a/intel/intel_decode.c
+++ b/intel/intel_decode.c
@@ -3630,7 +3630,6 @@ decode_3d_965(struct drm_intel_decode *ctx)
 
 	case 0x7a00:
 		if (IS_GEN6(devid) || IS_GEN7(devid)) {
-			unsigned int i;
 			if (len != 4 && len != 5)
 				fprintf(out, "Bad count in PIPE_CONTROL\n");
 
@@ -3732,8 +3731,6 @@ decode_3d_965(struct drm_intel_decode *ctx)
 		if (opcode_3d->func) {
 			return opcode_3d->func(ctx);
 		} else {
-			unsigned int i;
-
 			instr_out(ctx, 0, "%s\n", opcode_3d->name);
 
 			for (i = 1; i < len; i++) {
@@ -3883,9 +3880,9 @@ drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx,
 
 void
 drm_intel_decode_set_output_file(struct drm_intel_decode *ctx,
-				 FILE *out)
+				 FILE *output)
 {
-	ctx->out = out;
+	ctx->out = output;
 }
 
 /**
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-08-31 18:13 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24 16:34 [PATCH libdrm 01/17] vbltest: fix variable shadowing warning Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 02/17] modetest: fix shadowing warnings Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 03/17] intel: resolve " Emil Velikov
2015-08-31 18:13   ` Emil Velikov [this message]
2015-08-31 18:20     ` [PATCH libdrm v2] " Chris Wilson
2015-08-24 16:34 ` [PATCH libdrm 04/17] intel: error out on has_error in exec2 Emil Velikov
2015-08-31 18:14   ` [PATCH libdrm v2] " Emil Velikov
2015-08-31 18:26     ` Chris Wilson
2015-08-31 19:01       ` Emil Velikov
2015-08-31 19:09         ` Chris Wilson
2015-08-31 19:47           ` [PATCH libdrm 4.1/17] intel: introduce to_bo_gem() helper Emil Velikov
2015-08-31 19:48             ` Chris Wilson
2015-08-24 16:34 ` [PATCH libdrm 05/17] configure: enable -Wshadow when available Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 06/17] amdgpu: remove unneeded -Wno-switch-enum flag Emil Velikov
2015-08-24 17:08   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 07/17] modetest: annotate const data as such for good measure Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 08/17] libkms: use static const " Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 09/17] radeon: cleanup bo/cs func tables Emil Velikov
2015-08-24 17:06   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 10/17] freedreno: annotate the device/bo/pipe/ringbuffer funcs as const data Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 11/17] tests/amdgpu: reference the correct variable for memcpy Emil Velikov
2015-08-24 17:05   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 12/17] tests/amdgpu: annotate the uvd message templates as const data Emil Velikov
2015-08-24 17:06   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 13/17] tests/amdgpu: annotate (most of) the vce " Emil Velikov
2015-08-24 17:07   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 14/17] tests/amdgpu: ensure tests work by using c99 initializers Emil Velikov
2015-08-24 17:08   ` Alex Deucher
2015-09-04 16:33     ` Alex Deucher
2015-09-04 20:45       ` Emil Velikov
     [not found] ` <1440434060-31347-1-git-send-email-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-08-24 16:34   ` [PATCH libdrm 15/17] nouveau: use designated initializers Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 16/17] intel: ignore missing-field-initializers warnings Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 17/17] configure: remove -Wno-missing-field-initializers Emil Velikov

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=1441044792-13906-1-git-send-email-emil.l.velikov@gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.