mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Adi Kadušić" <kadusicadi1@gmail.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Joshua Crofts" <joshua.crofts1@gmail.com>,
	"Jorijn van der Graaf" <jorijnvdgraaf@catcrafts.net>,
	"Miao Li" <limiao@kylinos.cn>,
	"Uwe Kleine-König (The Capable Hub)"
	<u.kleine-koenig@baylibre.com>,
	"Rafael G. Dias" <rafael.guimaraes.dias@usp.br>,
	"Pan Chuang" <panchuang@vivo.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: light: stk3310: replace sprintf() with safer sysfs_emit()
Date: Fri, 23 Oct 2026 21:40:19 +0100	[thread overview]
Message-ID: <20261023214019.7861c071@jic23-hlaptop> (raw)
In-Reply-To: <20261023202543.144563-1-kadusicadi1@gmail.com>

On Fri, 23 Oct 2026 22:25:40 +0200
Adi Kadušić <kadusicadi1@gmail.com> wrote:

> This patch replaces sprintf() with sysfs_emit() safer alternative
> with no functional changes.
> 
> Signed-off-by: Adi Kadušić <kadusicadi1@gmail.com>
Applied.
> ---
>  drivers/iio/light/stk3310.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
> index 0a16e326e939..e751e7c97bc1 100644
> --- a/drivers/iio/light/stk3310.c
> +++ b/drivers/iio/light/stk3310.c
> @@ -18,7 +18,6 @@
>  #include <linux/pm.h>
>  #include <linux/property.h>
>  #include <linux/regmap.h>
> -#include <linux/sprintf.h>
>  #include <linux/sysfs.h>
>  #include <linux/types.h>
>  
> @@ -180,7 +179,7 @@ static ssize_t stk3310_read_near_level(struct iio_dev *indio_dev,
>  {
>  	struct stk3310_data *data = iio_priv(indio_dev);
>  
> -	return sprintf(buf, "%u\n", data->ps_near_level);
> +	return sysfs_emit(buf, "%u\n", data->ps_near_level);
>  }
>  
>  static const struct iio_chan_spec_ext_info stk3310_ext_info[] = {


      reply	other threads:[~2026-10-23 20:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 20:25 Adi Kadušić
2026-10-23 20:40 ` 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=20261023214019.7861c071@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jorijnvdgraaf@catcrafts.net \
    --cc=joshua.crofts1@gmail.com \
    --cc=kadusicadi1@gmail.com \
    --cc=limiao@kylinos.cn \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=panchuang@vivo.com \
    --cc=rafael.guimaraes.dias@usp.br \
    --cc=u.kleine-koenig@baylibre.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

all inboxes | Powered by JetHome®