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
Subject: Re: [PATCH v6 2/5] i3c: master: svc: Replace bool rnw with union for HDR support
Date: Thu, 23 Oct 2025 11:26:37 +0300 [thread overview]
Message-ID: <aPnmvepToKtZnAI-@smile.fi.intel.com> (raw)
In-Reply-To: <20251014-i3c_ddr-v6-2-3afe49773107@nxp.com>
On Tue, Oct 14, 2025 at 12:40:01PM -0400, Frank Li wrote:
> Replace the bool rnw field with a union in preparation for adding HDR
> support. HDR uses a cmd field instead of the rnw bit to indicate read or
> write direction.
>
> Add helper function svc_cmd_is_read() to check transfer direction.
>
> Add a local variable 'rnw' in svc_i3c_master_priv_xfers() to avoid
> repeatedly accessing xfers[i].rnw.
>
> No functional change.
...
> struct svc_i3c_cmd {
> u8 addr;
> - bool rnw;
> + union {
> + bool rnw;
> + u8 cmd;
> + u32 rnw_cmd;
> + };
Same Q, what is the selector?
> u8 *in;
> const void *out;
> unsigned int len;
> }
> +static bool svc_cmd_is_read(u32 rnw_cmd, u32 type)
> +{
> + return rnw_cmd;
> +}
Useless?
--
With Best Regards,
Andy Shevchenko
WARNING: multiple messages have this Message-ID (diff)
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
Subject: Re: [PATCH v6 2/5] i3c: master: svc: Replace bool rnw with union for HDR support
Date: Thu, 23 Oct 2025 11:26:37 +0300 [thread overview]
Message-ID: <aPnmvepToKtZnAI-@smile.fi.intel.com> (raw)
In-Reply-To: <20251014-i3c_ddr-v6-2-3afe49773107@nxp.com>
On Tue, Oct 14, 2025 at 12:40:01PM -0400, Frank Li wrote:
> Replace the bool rnw field with a union in preparation for adding HDR
> support. HDR uses a cmd field instead of the rnw bit to indicate read or
> write direction.
>
> Add helper function svc_cmd_is_read() to check transfer direction.
>
> Add a local variable 'rnw' in svc_i3c_master_priv_xfers() to avoid
> repeatedly accessing xfers[i].rnw.
>
> No functional change.
...
> struct svc_i3c_cmd {
> u8 addr;
> - bool rnw;
> + union {
> + bool rnw;
> + u8 cmd;
> + u32 rnw_cmd;
> + };
Same Q, what is the selector?
> u8 *in;
> const void *out;
> unsigned int len;
> }
> +static bool svc_cmd_is_read(u32 rnw_cmd, u32 type)
> +{
> + return rnw_cmd;
> +}
Useless?
--
With Best Regards,
Andy Shevchenko
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2025-10-23 8:26 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 16:39 [PATCH v6 0/5] i3c: Add basic HDR mode support Frank Li
2025-10-14 16:39 ` Frank Li
2025-10-14 16:40 ` [PATCH v6 1/5] i3c: Add HDR API support Frank Li
2025-10-14 16:40 ` Frank Li
2025-10-23 8:23 ` Andy Shevchenko
2025-10-23 8:23 ` Andy Shevchenko
2025-10-23 15:18 ` Frank Li
2025-10-23 15:18 ` Frank Li
2025-10-23 18:22 ` Andy Shevchenko
2025-10-23 18:22 ` Andy Shevchenko
2025-10-23 23:53 ` Frank Li
2025-10-23 23:53 ` Frank Li
2025-10-24 6:13 ` Andy Shevchenko
2025-10-24 6:13 ` Andy Shevchenko
2025-10-24 14:03 ` Frank Li
2025-10-24 14:03 ` Frank Li
2025-10-24 16:03 ` Andy Shevchenko
2025-10-24 16:03 ` Andy Shevchenko
2025-10-24 16:29 ` Frank Li
2025-10-24 16:29 ` Frank Li
2025-10-24 21:12 ` Alexandre Belloni
2025-10-24 21:12 ` Alexandre Belloni
2025-10-14 16:40 ` [PATCH v6 2/5] i3c: master: svc: Replace bool rnw with union for HDR support Frank Li
2025-10-14 16:40 ` Frank Li
2025-10-23 8:26 ` Andy Shevchenko [this message]
2025-10-23 8:26 ` Andy Shevchenko
2025-10-23 15:21 ` Frank Li
2025-10-23 15:21 ` Frank Li
2025-10-14 16:40 ` [PATCH v6 3/5] i3c: master: svc: Add basic HDR mode support Frank Li
2025-10-14 16:40 ` Frank Li
2025-10-23 8:29 ` Andy Shevchenko
2025-10-23 8:29 ` Andy Shevchenko
2025-10-23 15:24 ` Frank Li
2025-10-23 15:24 ` Frank Li
2025-10-23 18:25 ` Andy Shevchenko
2025-10-23 18:25 ` Andy Shevchenko
2025-10-23 23:44 ` Frank Li
2025-10-23 23:44 ` Frank Li
2025-10-14 16:40 ` [PATCH v6 4/5] dt-bindings: trivial-devices: add MEMSIC 3-axis magnetometer Frank Li
2025-10-14 16:40 ` Frank Li
2025-10-14 16:40 ` [PATCH v6 5/5] iio: magnetometer: Add mmc5633 sensor Frank Li
2025-10-14 16:40 ` Frank Li
2025-10-18 16:52 ` Jonathan Cameron
2025-10-18 16:52 ` Jonathan Cameron
2025-10-18 16:54 ` Jonathan Cameron
2025-10-18 16:54 ` Jonathan Cameron
2025-10-23 8:46 ` Andy Shevchenko
2025-10-23 8:46 ` Andy Shevchenko
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=aPnmvepToKtZnAI-@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=Frank.Li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.