From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá via B4 Relay" <devnull+nuno.sa.analog.com@kernel.org>
Cc: nuno.sa@analog.com, linux-iio@vger.kernel.org,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Esteban Blanc" <eblanc@baylibre.com>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Marius Cristea" <marius.cristea@microchip.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Matteo Martelli" <matteomartelli3@gmail.com>,
"Jiri Kosina" <jikos@kernel.org>,
"Srinivas Pandruvada" <srinivas.pandruvada@linux.intel.com>,
"Nuno Sá" <nuno.sal@analog.com>
Subject: Re: [PATCH 0/9] iio: replace sprintf() with sysfs_emit() in .read_label() op
Date: Sat, 4 Oct 2025 15:00:41 +0100 [thread overview]
Message-ID: <20251004150041.671ad44e@jic23-huawei> (raw)
In-Reply-To: <20250930-dev-sprintf-cleanup-v1-0-5d65d096a952@analog.com>
On Tue, 30 Sep 2025 16:33:09 +0100
Nuno Sá via B4 Relay <devnull+nuno.sa.analog.com@kernel.org> wrote:
> When looking at some drivers implementing the .read_label() callback it
> came to my attention that there were some outliers using sprintf() (or
> even snprintf() with PAGE_SIZE) instead of sysfs_emit(). This series
> cleans that up.
I hope this doesn't come back to bite us by a future in kernel consumer not
directly spitting the result of this into a sysfs read buffer. Anyhow
today it's fine and we have existing cases doing sysfs_emit() so arguably
any future problems aren't made worse by this patch set + for common usage
it's an improvement.
So applied.
Thanks,
Jonathan
>
> ---
> Nuno Sá (9):
> iio: adc: ad4030: replace sprintf() with sysfs_emit()
> iio: adc: ad7768-1: replace sprintf() with sysfs_emit()
> iio: adc: mcp3564: replace sprintf() with sysfs_emit()
> iio: adc: meson_saradc: replace sprintf() with sysfs_emit()
> iio: adc: mt6360-adc: replace snprintf() with sysfs_emit()
> iio: adc: pac1921: replace sprintf() with sysfs_emit()
> iio: adc: qcom-spmi-rradc: replace snprintf() with sysfs_emit()
> iio: position: hid-sensor-custom-intel-hinge: replace sprintf() with sysfs_emit()
> iio: resolver: ad2s1210: replace sprintf() with sysfs_emit()
>
> drivers/iio/adc/ad4030.c | 4 +--
> drivers/iio/adc/ad7768-1.c | 2 +-
> drivers/iio/adc/mcp3564.c | 2 +-
> drivers/iio/adc/meson_saradc.c | 6 ++---
> drivers/iio/adc/mt6360-adc.c | 2 +-
> drivers/iio/adc/pac1921.c | 8 +++---
> drivers/iio/adc/qcom-spmi-rradc.c | 2 +-
> .../iio/position/hid-sensor-custom-intel-hinge.c | 2 +-
> drivers/iio/resolver/ad2s1210.c | 30 +++++++++++-----------
> 9 files changed, 29 insertions(+), 29 deletions(-)
> ---
> base-commit: b9700f87939f0f477e5c00db817f54ab8a97702b
> change-id: 20250930-dev-sprintf-cleanup-baf2c89b3460
> --
>
> Thanks!
> - Nuno Sá
>
>
prev parent reply other threads:[~2025-10-04 14:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-30 15:33 [PATCH 0/9] iio: replace sprintf() with sysfs_emit() in .read_label() op Nuno Sá via B4 Relay
2025-09-30 15:33 ` [PATCH 1/9] iio: adc: ad4030: replace sprintf() with sysfs_emit() Nuno Sá via B4 Relay
2025-09-30 15:33 ` [PATCH 2/9] iio: adc: ad7768-1: " Nuno Sá via B4 Relay
2025-09-30 15:33 ` [PATCH 3/9] iio: adc: mcp3564: " Nuno Sá via B4 Relay
2025-09-30 15:59 ` Marius.Cristea
2025-09-30 15:33 ` [PATCH 4/9] iio: adc: meson_saradc: " Nuno Sá via B4 Relay
2025-09-30 15:33 ` [PATCH 5/9] iio: adc: mt6360-adc: replace snprintf() " Nuno Sá via B4 Relay
2025-09-30 15:33 ` [PATCH 6/9] iio: adc: pac1921: replace sprintf() " Nuno Sá via B4 Relay
2025-09-30 15:33 ` [PATCH 7/9] iio: adc: qcom-spmi-rradc: replace snprintf() " Nuno Sá via B4 Relay
2025-09-30 15:33 ` [PATCH 8/9] iio: position: hid-sensor-custom-intel-hinge: replace sprintf() " Nuno Sá via B4 Relay
2025-09-30 16:07 ` srinivas pandruvada
2025-09-30 15:33 ` [PATCH 9/9] iio: resolver: ad2s1210: " Nuno Sá via B4 Relay
2025-10-04 14:00 ` 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=20251004150041.671ad44e@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=devnull+nuno.sa.analog.com@kernel.org \
--cc=dlechner@baylibre.com \
--cc=eblanc@baylibre.com \
--cc=jbrunet@baylibre.com \
--cc=jikos@kernel.org \
--cc=khilman@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=marius.cristea@microchip.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=matteomartelli3@gmail.com \
--cc=matthias.bgg@gmail.com \
--cc=neil.armstrong@linaro.org \
--cc=nuno.sa@analog.com \
--cc=nuno.sal@analog.com \
--cc=srinivas.pandruvada@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