[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250706105754.1bf09585@jic23-huawei>
Date: Sun, 6 Jul 2025 10:57:54 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Chelsy Ratnawat <chelsyratnawat2001@...il.com>,
jean-baptiste.maneyrol@....com, dlechner@...libre.com, nuno.sa@...log.com,
andy@...nel.org, linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] iio: imu: inv_mpu6050: Replace scnprintf with
sysfs_emit
On Tue, 1 Jul 2025 22:19:09 +0300
Andy Shevchenko <andriy.shevchenko@...ux.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@...ux.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
>
Powered by blists - more mailing lists