From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Chelsy Ratnawat <chelsyratnawat2001@gmail.com>,
jean-baptiste.maneyrol@tdk.com, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: imu: inv_mpu6050: Replace scnprintf with sysfs_emit
Date: Sun, 6 Jul 2025 10:57:54 +0100 [thread overview]
Message-ID: <20250706105754.1bf09585@jic23-huawei> (raw)
In-Reply-To: <aGQ0re136jUaPN-o@smile.fi.intel.com>
On Tue, 1 Jul 2025 22:19:09 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> On Tue, Jul 01, 2025 at 08:47:20AM -0700, Chelsy Ratnawat wrote:
> > 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().
>
> ...
>
> > - return scnprintf(buf, PAGE_SIZE,
> > - "%d, %d, %d; %d, %d, %d; %d, %d, %d\n",
> > + return sysfs_emit(buf, "%d, %d, %d; %d, %d, %d; %d, %d, %d\n",
> > m[0], m[1], m[2], m[3], m[4], m[5], m[6], m[7], m[8]);
>
> Ideally second line should be reindented, but I won't be bothered by that
> right now.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Applied to the togreg branch of iio.git. I'll initially push that out
as testing to get some early build testing from 0-day.
Thanks,
Jonathan
>
prev parent reply other threads:[~2025-07-06 9:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 15:47 [PATCH v2] iio: imu: inv_mpu6050: Replace scnprintf with sysfs_emit Chelsy Ratnawat
2025-07-01 16:19 ` Jean-Baptiste Maneyrol
2025-07-01 19:19 ` Andy Shevchenko
2025-07-06 9: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=20250706105754.1bf09585@jic23-huawei \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy@kernel.org \
--cc=chelsyratnawat2001@gmail.com \
--cc=dlechner@baylibre.com \
--cc=jean-baptiste.maneyrol@tdk.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.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