drm/i915: i915_pmu: Use sysfs_emit() instead of sprintf()
Subsystems (2)
PATCH 1/1 drm/i915: i915_pmu: Use sysfs_emit() instead of sprintf()
Follow the advice in Documentation/filesystems/sysfs.rst:show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space.
--- drivers/gpu/drm/i915/i915_pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_pmu.c +2 -2
@@ -895,7 +895,7 @@ static ssize_t i915_pmu_format_show(struct device *dev,struct i915_str_attribute *eattr; eattr = container_of(attr, struct i915_str_attribute, attr); -return sprintf (buf,"%s\n" , eattr->str); +return sysfs_emit (buf,"%s\n" , eattr->str); }#define I915_PMU_FORMAT_ATTR (_name, _config) \
@@ -925,7 +925,7 @@ static ssize_t i915_pmu_event_show(struct device *dev,struct i915_ext_attribute *eattr; eattr = container_of(attr, struct i915_ext_attribute, attr); -return sprintf (buf,"config=0x%lx\n" , eattr->val); +return sysfs_emit (buf,"config=0x%lx\n" , eattr->val); }#define __event (__counter, __name, __unit) \
Signature · 1 line
2.51.0
Hi Madhur,
Quoted 5 lines · Madhur Kumar
Follow the advice in
Documentation/filesystems/sysfs.rst:show()should only usesysfs_emit()orsysfs_emit_at()when formatting the value to be returned to user space.Signed-off-by Madhur Kumar <[email protected]>
Thanks,
Andi
Patchwork
CI✗ LGCI.VerificationFailed: failure for drm/i915: i915_pmu: Use sysfs_emit() instead of sprintf() (rev2)
In reply to Madhur Kumar== Series Details ==
== Series Details ==
Series: drm/i915: i915_pmu: Use sysfs_emit() instead of sprintf() (rev2)
URL : https://patchwork.freedesktop.org/series/154965/
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!
Andi Shyti
AppliedHi Madhur,
Quoted 5 lines · Madhur Kumar
Follow the advice in
Documentation/filesystems/sysfs.rst:show()should only usesysfs_emit()orsysfs_emit_at()when formatting the value to be returned to user space.Signed-off-by Madhur Kumar <[email protected]>
merged to drm-intel-next.
Thank you,
Andi