Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Riana Tauro <riana.tauro@intel.com>
Cc: intel-xe@lists.freedesktop.org, anshuman.gupta@intel.com,
	rodrigo.vivi@intel.com, joshua.santosh.ranjan@intel.com,
	shubham.kumar@intel.com, badal.nilawar@intel.com,
	raag.jadav@intel.com
Subject: Re: [PATCH v3 1/2] drm/xe/xe_survivability: Redesign survivability mode
Date: Wed, 10 Dec 2025 16:57:57 +0900	[thread overview]
Message-ID: <20251210075757.GA1206705@ax162> (raw)
In-Reply-To: <20251208084539.3652902-5-riana.tauro@intel.com>

Hi Riana,

On Mon, Dec 08, 2025 at 02:15:41PM +0530, Riana Tauro wrote:
...
>  static void populate_survivability_info(struct xe_device *xe)
>  {
>  	struct xe_survivability *survivability = &xe->survivability;
> -	struct xe_survivability_info *info = survivability->info;
> +	u32 *info = survivability->info;
>  	struct xe_mmio *mmio;
>  	u32 id = 0, reg_value;
> -	char name[NAME_MAX];
>  	int index;
>  
>  	mmio = xe_root_tile_mmio(xe);
> -	set_survivability_info(mmio, info, id, "Capability Info");
> -	reg_value = info[id].value;
> +	set_survivability_info(mmio, info, CAPABILITY_INFO);
> +	reg_value = info[CAPABILITY_INFO];
>  
>  	if (reg_value & HISTORY_TRACKING) {
> -		id++;
> -		set_survivability_info(mmio, info, id, "Postcode Info");
> +		set_survivability_info(mmio, info, POSTCODE_TRACE);
>  
> -		if (reg_value & OVERFLOW_SUPPORT) {
> -			id = REG_FIELD_GET(OVERFLOW_REG_OFFSET, reg_value);
> -			set_survivability_info(mmio, info, id, "Overflow Info");
> -		}
> +		if (reg_value & OVERFLOW_SUPPORT)
> +			set_survivability_info(mmio, info, POSTCODE_TRACE_OVERFLOW);
>  	}
>  
>  	if (reg_value & AUXINFO_SUPPORT) {
>  		id = REG_FIELD_GET(AUXINFO_REG_OFFSET, reg_value);
>  
> -		for (index = 0; id && reg_value; index++, reg_value = info[id].value,
> -		     id = aux_history_offset(reg_value)) {
> -			snprintf(name, NAME_MAX, "Auxiliary Info %d", index);
> -			set_survivability_info(mmio, info, id, name);
> +		for (index = 0; id >= AUX_INFO0 && id < MAX_SCRATCH_REG; index++) {
> +			set_survivability_info(mmio, info, id);
> +			id = aux_history_offset(info[id]);
>  		}
>  	}

After this change as commit f4e9fc967afd ("drm/xe/xe_survivability:
Redesign survivability mode") in -next, Clang (and GCC 16, currently in
development) warns that index is set but unused now because it is only
incremented.

  drivers/gpu/drm/xe/xe_survivability_mode.c:147:6: error: variable 'index' set but not used [-Werror,-Wunused-but-set-variable]
    147 |         int index;
        |             ^

  drivers/gpu/drm/xe/xe_survivability_mode.c: In function 'populate_survivability_info':
  drivers/gpu/drm/xe/xe_survivability_mode.c:147:13: error: variable 'index' set but not used [-Werror=unused-but-set-variable=]
    147 |         int index;
        |             ^~~~~

Should this loop be rewritten to drop index or does index need to be
used somewhow?

Cheers,
Nathan

  parent reply	other threads:[~2025-12-10  7:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-08  8:45 [PATCH v3 0/2] Redesign survivability mode Riana Tauro
2025-12-08  8:45 ` [PATCH v3 1/2] drm/xe/xe_survivability: " Riana Tauro
2025-12-09 22:18   ` Rodrigo Vivi
2025-12-10  7:57   ` Nathan Chancellor [this message]
2025-12-08  8:45 ` [PATCH v3 2/2] drm/xe/xe_survivability: Add support for survivability mode v2 Riana Tauro
2025-12-08 13:08 ` ✓ CI.KUnit: success for Redesign survivability mode (rev3) Patchwork
2025-12-08 14:09 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-08 18:35 ` ✓ Xe.CI.Full: " 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=20251210075757.GA1206705@ax162 \
    --to=nathan@kernel.org \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=joshua.santosh.ranjan@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=shubham.kumar@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