lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPnmvepToKtZnAI-@smile.fi.intel.com>
Date: Thu, 23 Oct 2025 11:26:37 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Frank Li <Frank.Li@....com>
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>,
	Miquel Raynal <miquel.raynal@...tlin.com>,
	Jonathan Cameron <jic23@...nel.org>,
	David Lechner <dlechner@...libre.com>,
	Nuno Sá <nuno.sa@...log.com>,
	Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, linux-i3c@...ts.infradead.org,
	linux-kernel@...r.kernel.org, imx@...ts.linux.dev,
	linux-iio@...r.kernel.org, joshua.yeong@...rfivetech.com,
	devicetree@...r.kernel.org
Subject: Re: [PATCH v6 2/5] i3c: master: svc: Replace bool rnw with union for
 HDR support

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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ