* [PATCH] treewide: Replace scnprintf with sysfs_emit in
@ 2025-06-22 8:29 Abhinav Ananthu
2025-08-13 14:39 ` Jens Wiklander
0 siblings, 1 reply; 2+ messages in thread
From: Abhinav Ananthu @ 2025-06-22 8:29 UTC (permalink / raw)
To: jens.wiklander; +Cc: sumit.garg, op-tee, linux-kernel, Abhinav Ananthu
Use sysfs_emit() to format sysfs output instead of scnprintf() as recommended
by the kernel documentation.
Signed-off-by: Abhinav Ananthu <abhinav.ogl@gmail.com>
---
drivers/tee/optee/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index c75fddc83576..ce44e3498d37 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -72,7 +72,7 @@ static ssize_t rpmb_routing_model_show(struct device *dev,
else
s = "user";
- return scnprintf(buf, PAGE_SIZE, "%s\n", s);
+ return sysfs_emit(buf, "%s\n", s);
}
static DEVICE_ATTR_RO(rpmb_routing_model);
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] treewide: Replace scnprintf with sysfs_emit in
2025-06-22 8:29 [PATCH] treewide: Replace scnprintf with sysfs_emit in Abhinav Ananthu
@ 2025-08-13 14:39 ` Jens Wiklander
0 siblings, 0 replies; 2+ messages in thread
From: Jens Wiklander @ 2025-08-13 14:39 UTC (permalink / raw)
To: Abhinav Ananthu; +Cc: sumit.garg, op-tee, linux-kernel
Hi Abhinav,
On Sun, Jun 22, 2025 at 10:30 AM Abhinav Ananthu <abhinav.ogl@gmail.com> wrote:
>
> Use sysfs_emit() to format sysfs output instead of scnprintf() as recommended
> by the kernel documentation.
>
> Signed-off-by: Abhinav Ananthu <abhinav.ogl@gmail.com>
> ---
> drivers/tee/optee/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Your patch looks good, but I've already accepted another patch for the
same issue.
Thanks,
Jens
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-13 14:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-22 8:29 [PATCH] treewide: Replace scnprintf with sysfs_emit in Abhinav Ananthu
2025-08-13 14:39 ` Jens Wiklander
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®