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: <1e236993-47fc-45e9-913a-e0615787581a@gmail.com>
Date: Fri, 21 Mar 2025 14:17:16 +0200
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
 Jonathan Cameron <jic23@...nel.org>, Lars-Peter Clausen <lars@...afoo.de>,
 Nuno Sa <nuno.sa@...log.com>, David Lechner <dlechner@...libre.com>,
 Javier Carrasco <javier.carrasco.cruz@...il.com>,
 Olivier Moysan <olivier.moysan@...s.st.com>,
 Guillaume Stols <gstols@...libre.com>,
 Dumitru Ceclan <mitrutzceclan@...il.com>,
 Trevor Gamblin <tgamblin@...libre.com>,
 Matteo Martelli <matteomartelli3@...il.com>,
 Alisa-Dariana Roman <alisadariana@...il.com>,
 João Paulo Gonçalves <joao.goncalves@...adex.com>,
 AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
 linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org
Subject: Re: [PATCH v9 6/8] iio: adc: Support ROHM BD79124 ADC

On 21/03/2025 14:06, Andy Shevchenko wrote:
> On Fri, Mar 21, 2025 at 10:01:00AM +0200, Matti Vaittinen wrote:
>> On 20/03/2025 15:16, Andy Shevchenko wrote:
>>> On Thu, Mar 20, 2025 at 10:22:00AM +0200, Matti Vaittinen wrote:
> 
> You can get rid of all of these by simply using __le16. I do not understand why
> it's not used so far. I thought that bits are mirrored, that may explain the
> case, but now I do not see any problem to use __le16 directly.
> 

This discussion is going in circles now. That was discussed in the RFC 
review with Jonathan, which I did also tell to you during the v7 review:

...

 > And how this is different from treating it as __le16? Needs a good 
comment
 > about bit layout.

You don't think:
  >> +struct bd79124_raw {
  >> +	u8 bit0_3; /* Is set in high bits of the byte */
  >> +	u8 bit4_11;
  >> +};
suffices? It's hard for me to think how to explain bit layout more
explicitly.

This was discussed during the RFC review. I explained the rationale why
I rather represent this as two 8 bit variables than le16 with
(mysterious to me) shift. As a result, Jonathan told me he's not feeling
(too) strong about this (but also warned we may see follow-up patches
converting this to le and shift - which, by the way, is harder for me to
understand).

https://lore.kernel.org/all/bb403ddb-5c6f-4286-8d80-3ede40f94dc2@gmail.com/

...

Yours,
	-- Matti

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ