Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] drm/xe/throttle: Skip reason prefix while emitting array
@ 2025-12-03 12:33 Raag Jadav
  2025-12-03 12:42 ` ✓ CI.KUnit: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Raag Jadav @ 2025-12-03 12:33 UTC (permalink / raw)
  To: intel-xe; +Cc: rodrigo.vivi, sk.anirban, Raag Jadav

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))
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-12-08 13:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v1] " Anirban, Sk
2025-12-08  4:37   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox