From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Frank Li <Frank.li@nxp.com>
Cc: "Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, linux-iio@vger.kernel.org,
joshua.yeong@starfivetech.com, devicetree@vger.kernel.org,
"Carlos Song" <carlos.song@nxp.com>,
"Adrian Fluturel" <fluturel.adrian@gmail.com>
Subject: Re: [PATCH v7 5/5] iio: magnetometer: Add mmc5633 sensor
Date: Thu, 30 Oct 2025 09:51:09 +0200 [thread overview]
Message-ID: <aQMY7WaDixv9C2QE@smile.fi.intel.com> (raw)
In-Reply-To: <aQI4v1lVcagBWY3i@lizhi-Precision-Tower-5810>
On Wed, Oct 29, 2025 at 11:54:39AM -0400, Frank Li wrote:
> On Tue, Oct 28, 2025 at 12:50:55PM +0200, Andy Shevchenko wrote:
> > On Mon, Oct 27, 2025 at 04:08:33PM -0400, Frank Li wrote:
...
> > > +static const struct {
> > > + int val;
> > > + int val2;
> >
> > No need. Just
> >
> > > +} mmc5633_samp_freq[] = {
>
> There are some place will like
>
> if (mmc5633_samp_freq[i][0] == val &&
> mmc5633_samp_freq[i][1] == val2)
>
> previous
> if (mmc5633_samp_freq[i].val == val &&
> mmc5633_samp_freq[i].val2 == val2)
>
> Previous version seem have better readablity. But it is not big deal, if
> you like, I change to [0][1].
It's not my preference, it's how all but this driver do in IIO, it's about
consistency of the style / patterns.
...
> > struct i3c_device doesn't have a name, does it?
>
> It has name, but it is hexnumber (VID+PID), like 0-4a20000f000.
> So use friend/readable name here.
I think it's better to use the name provided by the subsystem. This way we may
guarantee the unique one. The hard coded values potentially might collide
(imagine some I³C driver for the very similar chip, let's say, in hwmon).
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2025-10-30 7:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 20:08 [PATCH v7 0/5] i3c: Add basic HDR mode support Frank Li
2025-10-27 20:08 ` [PATCH v7 1/5] i3c: Add HDR API support Frank Li
2025-10-28 15:30 ` Guenter Roeck
2025-10-27 20:08 ` [PATCH v7 2/5] i3c: master: svc: Replace bool rnw with union for HDR support Frank Li
2025-10-27 20:08 ` [PATCH v7 3/5] i3c: master: svc: Add basic HDR mode support Frank Li
2025-10-27 20:08 ` [PATCH v7 4/5] dt-bindings: trivial-devices: add MEMSIC 3-axis magnetometer Frank Li
2025-10-27 20:08 ` [PATCH v7 5/5] iio: magnetometer: Add mmc5633 sensor Frank Li
2025-10-28 10:50 ` Andy Shevchenko
2025-10-28 15:31 ` Frank Li
2025-10-29 8:07 ` Andy Shevchenko
2025-10-29 15:54 ` Frank Li
2025-10-30 7:51 ` Andy Shevchenko [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=aQMY7WaDixv9C2QE@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=Frank.li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andy@kernel.org \
--cc=carlos.song@nxp.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=fluturel.adrian@gmail.com \
--cc=imx@lists.linux.dev \
--cc=jic23@kernel.org \
--cc=joshua.yeong@starfivetech.com \
--cc=krzk+dt@kernel.org \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/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