From: Jonathan Cameron <jic23@kernel.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Minu Jin <s9430939@naver.com>,
lars@metafoo.de, Michael.Hennerich@analog.com, andy@kernel.org,
linux-iio@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ad7816: use sysfs_emit() instead of sprintf()
Date: Tue, 21 Apr 2026 15:57:20 +0100 [thread overview]
Message-ID: <20260421155720.7c4a8474@jic23-huawei> (raw)
In-Reply-To: <2026042032-unbeaten-magnetism-677c@gregkh>
On Mon, 20 Apr 2026 14:30:05 +0200
Greg KH <gregkh@linuxfoundation.org> wrote:
> On Mon, Apr 20, 2026 at 08:27:20PM +0900, Minu Jin wrote:
> > Replace sprintf() with sysfs_emit().
> > sysfs_emit() is preferred than sprintf() in show() functions.
>
> For _new_ functions, not existing ones.
>
> > It has aware of the PAGE_SIZE buffer limit and ensures safe buffer handling.
>
> Are any of the current usages incorrect? If not, no need to change
> this.
>
I wouldn't mind it if part of more general cleanup and modernisation, particularly
if that was touching the relevant bit of the code.
Before sending a patch check if anything similar is on list.
There is one other near identical one I rejected and a more significant
cleanup series that is undergoing revisions...
Thanks,
Jonathan
> thanks,
>
> greg k-h
>
prev parent reply other threads:[~2026-04-21 14:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 11:27 [PATCH] iio: adc: ad7816: use sysfs_emit() instead of sprintf() Minu Jin
2026-04-20 12:30 ` Greg KH
2026-04-21 14:57 ` Jonathan Cameron [this message]
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=20260421155720.7c4a8474@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=s9430939@naver.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