drm: xe: Replace sprintf() with sysfs_emit()
Subsystems (2)
PATCH RESEND 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
@@ -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
Patchwork
CI✗ LGCI.VerificationFailed: failure for drm: xe: Replace sprintf() with sysfs_emit() (rev2)
== Series Details ==
== Series Details ==
Series: drm: xe: Replace sprintf() with sysfs_emit() (rev2)
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!
Rodrigo Vivi
maintainerQuoted 7 lines · Madhur Kumar
Replace
sprintf()calls withsysfs_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.Signed-off-by Madhur Kumar <[email protected]>
Thanks for the patch.
I just did a small adjustment in the patch subject while getting it pushed to drm-xe-next.
[drm-xe-next af90706f0eec] drm/xe/pmu: Replace sprintf() with sysfs_emit()
Quoted 20 lines
--- drivers/gpu/drm/xe/xe_pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/xe/xe_pmu.c +1
-1@@ -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