* [PATCH] usb: gadget: f_uac2: replace scnprintf() with sysfs_emit()
[not found] <20250704003425.467299-1-sumanth.gavini.ref@yahoo.com>
@ 2025-07-04 0:34 ` Sumanth Gavini
2025-07-17 0:17 ` Sumanth Gavini
0 siblings, 1 reply; 3+ messages in thread
From: Sumanth Gavini @ 2025-07-04 0:34 UTC (permalink / raw)
To: gregkh, jkeeping, kgroeneveld, Chris.Wulff, quic_prashk,
linux-kernel
Cc: Sumanth Gavini, linux-usb
Documentation/filesystems/sysfs.rst mentions that show() should only
use sysfs_emit() or sysfs_emit_at() when formating the value to be
returned to user space. So replace scnprintf() with sysfs_emit().
Signed-off-by: Sumanth Gavini <sumanth.gavini@yahoo.com>
---
drivers/usb/gadget/function/f_uac2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c
index 9b324821c93b..dd252ff2fb4e 100644
--- a/drivers/usb/gadget/function/f_uac2.c
+++ b/drivers/usb/gadget/function/f_uac2.c
@@ -2052,7 +2052,7 @@ static ssize_t f_uac2_opts_##name##_show(struct config_item *item, \
int result; \
\
mutex_lock(&opts->lock); \
- result = scnprintf(page, sizeof(opts->name), "%s", opts->name); \
+ result = sysfs_emit(page, "%s", opts->name); \
mutex_unlock(&opts->lock); \
\
return result; \
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] usb: gadget: f_uac2: replace scnprintf() with sysfs_emit()
2025-07-04 0:34 ` [PATCH] usb: gadget: f_uac2: replace scnprintf() with sysfs_emit() Sumanth Gavini
@ 2025-07-17 0:17 ` Sumanth Gavini
2025-07-17 5:06 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Sumanth Gavini @ 2025-07-17 0:17 UTC (permalink / raw)
To: sumanth.gavini
Cc: Chris.Wulff, gregkh, jkeeping, kgroeneveld, linux-kernel,
linux-usb, quic_prashk
Hi All,
Just following up on my patch submitted with subject "[PATCH] usb: gadget: f_uac2: replace scnprintf() with sysfs_emit()".
Original message: https://lore.kernel.org/all/20250704003425.467299-1-sumanth.gavini@yahoo.com/
Would you have any feedback on this change? I'd be happy to address any comments or concerns.
Thank you for your time and consideration.
Regards,
Sumanth Gavini
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: gadget: f_uac2: replace scnprintf() with sysfs_emit()
2025-07-17 0:17 ` Sumanth Gavini
@ 2025-07-17 5:06 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2025-07-17 5:06 UTC (permalink / raw)
To: Sumanth Gavini
Cc: Chris.Wulff, jkeeping, kgroeneveld, linux-kernel, linux-usb,
quic_prashk
On Wed, Jul 16, 2025 at 07:17:07PM -0500, Sumanth Gavini wrote:
> Hi All,
>
> Just following up on my patch submitted with subject "[PATCH] usb: gadget: f_uac2: replace scnprintf() with sysfs_emit()".
>
> Original message: https://lore.kernel.org/all/20250704003425.467299-1-sumanth.gavini@yahoo.com/
>
> Would you have any feedback on this change? I'd be happy to address any comments or concerns.
It was merged into my tree 10 days ago, you should have gotten an email
about it already, right? Look in linux-next, it's there.
confused,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-17 5:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250704003425.467299-1-sumanth.gavini.ref@yahoo.com>
2025-07-04 0:34 ` [PATCH] usb: gadget: f_uac2: replace scnprintf() with sysfs_emit() Sumanth Gavini
2025-07-17 0:17 ` Sumanth Gavini
2025-07-17 5:06 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).