Skip to contentSkip to conversation

drm: xe: Replace sprintf() with sysfs_emit()

PATCH Superseded Madhur Kumar 2 participants 2 messages Dec 5, 2025 – Dec 8, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: xe: Replace sprintf() with sysfs_emit()

Replace sprintf() calls with sysfs_emit() to follow current kernel coding standards.

sysfs_emit() is the preferred method for formatting sysfs output as it provides better bounds checking and is more secure.

---
 drivers/gpu/drm/xe/xe_pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/xe/xe_pmu.c +1 -1
index cab51d826345..f016459c9904 100644
@@ -425,7 +425,7 @@ static ssize_t event_attr_show(struct device *dev,
 	struct perf_pmu_events_attr *pmu_attr =
 		container_of(attr, struct perf_pmu_events_attr, attr);
 
-	return sprintf(buf, "event=%#04llx\n", pmu_attr->id);
+	return sysfs_emit(buf, "event=%#04llx\n", pmu_attr->id);
 }
 
 #define XE_EVENT_ATTR(name_, v_, id_)					\
Signature · 1 line
2.52.0
#1 lore raw

✗ LGCI.VerificationFailed: failure for drm: xe: Replace sprintf() with sysfs_emit()

== Series Details ==

== Series Details ==

Series: drm: xe: Replace sprintf() with sysfs_emit()
URL : https://patchwork.freedesktop.org/series/158644/
State : failure

== Summary ==

Address '[email protected]' is not on the allowlist, which prevents CI from being triggered for this patch. If you want Intel GFX CI to accept this address, please contact the script maintainers at [email protected]. Exception occurred during validation, bailing out!