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: <Z-pGIMC7cu0QPBzi@smile.fi.intel.com>
Date: Mon, 31 Mar 2025 10:37:04 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Matti Vaittinen <mazziesaccount@...il.com>,
	Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
	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 v7 06/10] iio: adc: Support ROHM BD79124 ADC

On Sun, Mar 30, 2025 at 05:04:36PM +0100, Jonathan Cameron wrote:
> On Mon, 17 Mar 2025 13:24:07 +0200
> Matti Vaittinen <mazziesaccount@...il.com> wrote:
> > On 16/03/2025 13:02, Jonathan Cameron wrote:
> > > On Thu, 13 Mar 2025 09:19:03 +0200
> > > Matti Vaittinen <mazziesaccount@...il.com> wrote:  

...

> > >> +	return (data->alarm_monitored[chan->channel] & BIT(dir));  
> > > 
> > > Drop the outer brackets as not adding anything.  
> > 
> > I just noticed that the integer returned from here is directly provided 
> > to the user-space. I don't know the history, but it feels a bit off to 
> > me. I mean, I would expect the read from sysfs file "*_en" to return '1' 
> > or '0' - not 0x04.
> > 
> > Oh well, I suppose it's too late to change this in the IIO core - but 
> > I'll do:
> > 	return !!(data->alarm_monitored[chan->channel] & BIT(dir));
> 
> Agreed it should be returning 1 or 0.
> 
> This stuff is a little bit messy.  I'd not be against that ABI
> cleanup if we squashed the values to 0,1 in the core as a follow up.
> 
> I doubt anyone relies on getting 0x4 as that would be very driver
> specific userspace code!

FWIW, the time this discussion was held, I looked at the code and it seems
we have such drivers. I doubt we can change it without potential breakage of
(some) user space tools.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ