From: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Al Viro <viro@zeniv.linux.org.uk>, Sam Day <me@samcday.com>,
Christian Brauner <brauner@kernel.org>,
Chen Ni <nichen@iscas.ac.cn>, Mateusz Guzik <mjguzik@gmail.com>,
Liang Jie <liangjie@lixiang.com>,
Ingo Rohloff <ingo.rohloff@lauterbach.com>,
Owen Gu <guhuinan@xiaomi.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
Subject: [PATCH 0/2] usb: gadget: Use sysfs_emit instead of sprintf
Date: Sat, 31 Jan 2026 21:31:09 +0530 [thread overview]
Message-ID: <20260131160111.3161630-1-krishna.kurapati@oss.qualcomm.com> (raw)
Use sysfs_emit() instead of sprintf() in configfs attribute show functions.
sysfs_emit() is the recommended API for sysfs output as it provides buffer
overflow protection and proper formatting.
Krishna Kurapati (2):
usb: gadget: f_fs: Use sysfs_emit() in configfs show function
usb: gadget: f_sourcesink: Use sysfs_emit() in configfs show functions
drivers/usb/gadget/function/f_fs.c | 2 +-
drivers/usb/gadget/function/f_sourcesink.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
--
2.34.1
next reply other threads:[~2026-01-31 16:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-31 16:01 Krishna Kurapati [this message]
2026-01-31 16:01 ` [PATCH 1/2] usb: gadget: f_fs: Use sysfs_emit() in configfs show function Krishna Kurapati
2026-01-31 16:01 ` [PATCH 2/2] usb: gadget: f_sourcesink: Use sysfs_emit() in configfs show functions Krishna Kurapati
2026-02-01 7:28 ` [PATCH 0/2] usb: gadget: Use sysfs_emit instead of sprintf Greg Kroah-Hartman
2026-02-01 10:31 ` Krishna Kurapati
2026-02-01 10:35 ` Greg Kroah-Hartman
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=20260131160111.3161630-1-krishna.kurapati@oss.qualcomm.com \
--to=krishna.kurapati@oss.qualcomm.com \
--cc=brauner@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=gregkh@linuxfoundation.org \
--cc=guhuinan@xiaomi.com \
--cc=ingo.rohloff@lauterbach.com \
--cc=liangjie@lixiang.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=me@samcday.com \
--cc=mjguzik@gmail.com \
--cc=nichen@iscas.ac.cn \
--cc=viro@zeniv.linux.org.uk \
/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