Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Anirban, Sk" <sk.anirban@intel.com>
To: Raag Jadav <raag.jadav@intel.com>, <intel-xe@lists.freedesktop.org>
Cc: <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v1] drm/xe/throttle: Skip reason prefix while emitting array
Date: Thu, 4 Dec 2025 15:12:39 +0530	[thread overview]
Message-ID: <764e770a-42af-44c5-82f8-7dcdb2204843@intel.com> (raw)
In-Reply-To: <20251203123355.571606-1-raag.jadav@intel.com>

Hi,

On 03-12-2025 06:03 pm, Raag Jadav wrote:
> The newly introduced "reasons" attribute already signifies possible
> reasons for throttling and makes the prefix in individual attribute
> names redundant while emitting them as an array. Skip the prefix.
>
> Fixes: 83ccde67a3f7 ("drm/xe/gt_throttle: Avoid TOCTOU when monitoring reasons")
> Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_gt_throttle.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_throttle.c b/drivers/gpu/drm/xe/xe_gt_throttle.c
> index 096a6187ff12..570358310e97 100644
> --- a/drivers/gpu/drm/xe/xe_gt_throttle.c
> +++ b/drivers/gpu/drm/xe/xe_gt_throttle.c
> @@ -137,7 +137,7 @@ static ssize_t reasons_show(struct kobject *kobj,
>   		struct throttle_attribute *other_ta = kobj_attribute_to_throttle(kattr);
>   
>   		if (other_ta->mask != U32_MAX && reasons & other_ta->mask)
> -			ret += sysfs_emit_at(buff, ret, "%s ", (*pother)->name);
> +			ret += sysfs_emit_at(buff, ret, "%s ", (*pother)->name + strlen("reason_"));
>   	}
>   
>   	if (drm_WARN_ONCE(&xe->drm, !ret, "Unknown reason: %#x\n", reasons))
LGTM.

Reviewed-by: Sk Anirban <sk.anirban@intel.com>


Anirban


  parent reply	other threads:[~2025-12-04  9:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03 12:33 [PATCH v1] drm/xe/throttle: Skip reason prefix while emitting array Raag Jadav
2025-12-03 12:42 ` ✓ CI.KUnit: success for " Patchwork
2025-12-04  9:42 ` Anirban, Sk [this message]
2025-12-08  4:37   ` [PATCH v1] " Raag Jadav
2025-12-08 13:28     ` Rodrigo Vivi
2025-12-08  4:45 ` ✓ CI.KUnit: success for drm/xe/throttle: Skip reason prefix while emitting array (rev2) Patchwork
2025-12-08  5:47 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-08  7:09 ` ✗ 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=764e770a-42af-44c5-82f8-7dcdb2204843@intel.com \
    --to=sk.anirban@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=raag.jadav@intel.com \
    --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