Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Nirmoy Das <nirmoy.das@intel.com>
Subject: [PATCH i-g-t 2/2] lib/xe/xe_query: Fix compilation -Wshadow warning
Date: Tue, 16 Jan 2024 15:43:33 +0100	[thread overview]
Message-ID: <20240116144336.18068-2-nirmoy.das@intel.com> (raw)
In-Reply-To: <20240116144336.18068-1-nirmoy.das@intel.com>

Fix -Wshadow warning when xe_for_each_engine() and
xe_for_each_mem_region are used together.

Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 lib/xe/xe_query.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/xe/xe_query.h b/lib/xe/xe_query.h
index 1e3a7bdb9..032db1308 100644
--- a/lib/xe/xe_query.h
+++ b/lib/xe/xe_query.h
@@ -67,8 +67,8 @@ struct xe_device {
 	for (__gt = 0; __gt < xe_number_gt(__fd); ++__gt)
 
 #define xe_for_each_mem_region(__fd, __memreg, __r) \
-	for (uint64_t __i = 0; __i < igt_fls(__memreg); __i++) \
-		for_if(__r = (__memreg & (1ull << __i)))
+	for (uint64_t __j = 0; __j < igt_fls(__memreg); __j++) \
+		for_if(__r = (__memreg & (1ull << __j)))
 
 #define XE_IS_CLASS_SYSMEM(__region) ((__region)->mem_class == DRM_XE_MEM_REGION_CLASS_SYSMEM)
 #define XE_IS_CLASS_VRAM(__region) ((__region)->mem_class == DRM_XE_MEM_REGION_CLASS_VRAM)
-- 
2.42.0

  reply	other threads:[~2024-01-16 14:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16 14:43 [PATCH i-g-t 1/2] tests/intel: Add xe_exec_atomic test Nirmoy Das
2024-01-16 14:43 ` Nirmoy Das [this message]
2024-01-17  9:43   ` [PATCH i-g-t 2/2] lib/xe/xe_query: Fix compilation -Wshadow warning Kumar, Janga Rahul
2024-01-16 15:58 ` ✗ CI.xeBAT: failure for series starting with [i-g-t,1/2] tests/intel: Add xe_exec_atomic test Patchwork
2024-01-16 16:02 ` ✓ Fi.CI.BAT: success " Patchwork
2024-01-16 17:28 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-01-17  9:48 ` [PATCH i-g-t 1/2] " Kumar, Janga Rahul

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=20240116144336.18068-2-nirmoy.das@intel.com \
    --to=nirmoy.das@intel.com \
    --cc=igt-dev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox