From: Madhur Kumar <madhurkumar004@gmail.com>
To: lucas.demarchi@intel.com, thomas.hellstrom@linux.intel.com,
rodrigo.vivi@intel.com
Cc: airlied@gmail.com, simona@ffwll.ch,
intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
Madhur Kumar <madhurkumar004@gmail.com>
Subject: [PATCH RESEND] drm: xe: Replace sprintf() with sysfs_emit()
Date: Sun, 14 Dec 2025 14:06:59 +0530 [thread overview]
Message-ID: <20251214083659.2412218-1-madhurkumar004@gmail.com> (raw)
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.
Signed-off-by: Madhur Kumar <madhurkumar004@gmail.com>
---
drivers/gpu/drm/xe/xe_pmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_pmu.c b/drivers/gpu/drm/xe/xe_pmu.c
index cab51d826345..f016459c9904 100644
--- a/drivers/gpu/drm/xe/xe_pmu.c
+++ b/drivers/gpu/drm/xe/xe_pmu.c
@@ -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_) \
--
2.52.0
next reply other threads:[~2025-12-15 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-14 8:36 Madhur Kumar [this message]
2025-12-15 18:20 ` ✗ LGCI.VerificationFailed: failure for drm: xe: Replace sprintf() with sysfs_emit() (rev2) Patchwork
2025-12-19 15:32 ` [PATCH RESEND] drm: xe: Replace sprintf() with sysfs_emit() Rodrigo Vivi
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=20251214083659.2412218-1-madhurkumar004@gmail.com \
--to=madhurkumar004@gmail.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=thomas.hellstrom@linux.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