From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: David Lechner <dlechner@baylibre.com>
Cc: "Akshay Bansod" <akbansd@gmail.com>,
"Lorenzo Bianconi" <lorenzo@kernel.org>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-kernel-mentees@lists.linuxfoundation.org,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: st_lsm6dsx: Replace scnprintf with sysfs_emit
Date: Wed, 2 Jul 2025 18:22:38 +0300 [thread overview]
Message-ID: <aGVOvgxhBO_qSoe3@smile.fi.intel.com> (raw)
In-Reply-To: <e474db53-1b52-48b0-9253-2f62a3861bb4@baylibre.com>
On Wed, Jul 02, 2025 at 10:04:23AM -0500, David Lechner wrote:
> On 7/2/25 9:55 AM, Andy Shevchenko wrote:
> > On Wed, Jul 02, 2025 at 09:16:51AM -0500, David Lechner wrote:
> >> On 7/2/25 8:58 AM, Akshay Bansod wrote:
...
> >>> + len += sysfs_emit_at(buf, len, "%d.%03d ",
> >>> odr_table->odr_avl[i].milli_hz / 1000,
> >>> odr_table->odr_avl[i].milli_hz % 1000);
> >>
> >> Let's keep checkpatch happy and change the indent of the wrapped lines to
> >> line up with ( since the ( moved.
> >
> > While I see the point, wouldn't be better to have 1000 replaced with MILLI
> > at the same time?
>
> For anything with 3 zeros, I don't consider MILLI better (or worse).
> Science shows that the average human can easily see 3 or 4 things
> without having to count them [1]. So it is only when we start getting
> more 0s than that is when I think we should be picky about using macros
> instead.
>
> And in this particular case, we are converting milli to micro so `1000`
> should be replaced by `(MICRO / MILLI)` if we are going to do that.
I see. This changes the picture drastically. Let's leave it for another day then.
> [1]: https://www.scientificamerican.com/article/your-brain-finds-it-easy-to-size-up-four-objects-but-not-five-heres-why/
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-07-02 15:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 13:58 [PATCH] iio: st_lsm6dsx: Replace scnprintf with sysfs_emit Akshay Bansod
2025-07-02 14:16 ` David Lechner
2025-07-02 14:55 ` Andy Shevchenko
2025-07-02 15:04 ` David Lechner
2025-07-02 15:22 ` Andy Shevchenko [this message]
2025-07-02 15:33 ` Jonathan Cameron
2025-07-02 15:53 ` David Lechner
2025-07-03 9:05 ` Andy Shevchenko
2025-07-03 12:31 ` David Lechner
2025-07-02 14:57 ` akshay bansod
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=aGVOvgxhBO_qSoe3@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=akbansd@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@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