From: Riana Tauro <riana.tauro@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: riana.tauro@intel.com, anshuman.gupta@intel.com,
rodrigo.vivi@intel.com, badal.nilawar@intel.com
Subject: [PATCH v2 1/2] drm/xe/xe_survivability: Remove unused index
Date: Thu, 18 Dec 2025 16:21:53 +0530 [thread overview]
Message-ID: <20251218105151.586575-5-riana.tauro@intel.com> (raw)
In-Reply-To: <20251218105151.586575-4-riana.tauro@intel.com>
Remove unused index variable and fix for loop.
Fixes: f4e9fc967afd ("drm/xe/xe_survivability: Redesign survivability mode")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Closes: https://lore.kernel.org/intel-xe/20251210075757.GA1206705@ax162/
Signed-off-by: Riana Tauro <riana.tauro@intel.com>
---
v2: remove unnecessary offset helper (Rodrigo)
---
drivers/gpu/drm/xe/xe_survivability_mode.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c b/drivers/gpu/drm/xe/xe_survivability_mode.c
index 7520d7b7f9b8..2869866537ad 100644
--- a/drivers/gpu/drm/xe/xe_survivability_mode.c
+++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
@@ -128,11 +128,6 @@ xe_survivability_attribute *dev_attr_to_survivability_attr(struct device_attribu
return container_of(attr, struct xe_survivability_attribute, attr);
}
-static u32 aux_history_offset(u32 reg_value)
-{
- return REG_FIELD_GET(AUXINFO_HISTORY_OFFSET, reg_value);
-}
-
static void set_survivability_info(struct xe_mmio *mmio, u32 *info, int id)
{
info[id] = xe_mmio_read32(mmio, PCODE_SCRATCH(id));
@@ -144,7 +139,6 @@ static void populate_survivability_info(struct xe_device *xe)
u32 *info = survivability->info;
struct xe_mmio *mmio;
u32 id = 0, reg_value;
- int index;
mmio = xe_root_tile_mmio(xe);
set_survivability_info(mmio, info, CAPABILITY_INFO);
@@ -162,13 +156,12 @@ static void populate_survivability_info(struct xe_device *xe)
set_survivability_info(mmio, info, POSTCODE_TRACE_OVERFLOW);
}
+ /* Traverse the linked list of aux info registers */
if (reg_value & AUXINFO_SUPPORT) {
- id = REG_FIELD_GET(AUXINFO_REG_OFFSET, reg_value);
-
- for (index = 0; id >= AUX_INFO0 && id < MAX_SCRATCH_REG; index++) {
+ for (id = REG_FIELD_GET(AUXINFO_REG_OFFSET, reg_value);
+ id >= AUX_INFO0 && id < MAX_SCRATCH_REG;
+ id = REG_FIELD_GET(AUXINFO_HISTORY_OFFSET, info[id]))
set_survivability_info(mmio, info, id);
- id = aux_history_offset(info[id]);
- }
}
}
--
2.47.1
next prev parent reply other threads:[~2025-12-18 10:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 10:51 [PATCH v2 0/2] Survivability Mode Fixes Riana Tauro
2025-12-18 10:30 ` ✓ CI.KUnit: success for Survivability mode fixes (rev2) Patchwork
2025-12-18 10:51 ` Riana Tauro [this message]
2025-12-18 22:46 ` [PATCH v2 1/2] drm/xe/xe_survivability: Remove unused index Rodrigo Vivi
2025-12-18 10:51 ` [PATCH v2 2/2] drm/xe/xe_survivability: Fix static analysis tool reported issues Riana Tauro
2025-12-18 22:46 ` Rodrigo Vivi
2025-12-19 7:39 ` Riana Tauro
2025-12-18 11:04 ` ✓ Xe.CI.BAT: success for Survivability mode fixes (rev2) Patchwork
2025-12-19 6:11 ` ✗ Xe.CI.Full: failure " Patchwork
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=20251218105151.586575-5-riana.tauro@intel.com \
--to=riana.tauro@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
/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