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: <20251206180725.4f8f2840@jic23-huawei>
Date: Sat, 6 Dec 2025 18:07:25 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Nuno Sá <noname.nuno@...il.com>, Kurt Borja
 <kuurtb@...il.com>, Andy Shevchenko <andriy.shevchenko@...el.com>,
 Lars-Peter Clausen <lars@...afoo.de>, Michael Hennerich
 <Michael.Hennerich@...log.com>, Benson Leung <bleung@...omium.org>, Antoniu
 Miclaus <antoniu.miclaus@...log.com>, Gwendal Grignou
 <gwendal@...omium.org>, Shrikant Raskar <raskar.shree97@...il.com>,
 Per-Daniel Olsson <perdaniel.olsson@...s.com>, David Lechner
 <dlechner@...libre.com>, Nuno Sá <nuno.sa@...log.com>, Andy
 Shevchenko <andy@...nel.org>, Guenter Roeck <groeck@...omium.org>, Jonathan
 Cameron <Jonathan.Cameron@...wei.com>, linux-iio@...r.kernel.org,
 linux-kernel@...r.kernel.org, chrome-platform@...ts.linux.dev
Subject: Re: [PATCH RFC 1/6] iio: core: Match iio_device_claim_*() return
 semantics

On Thu, 4 Dec 2025 17:05:29 +0200
Andy Shevchenko <andy.shevchenko@...il.com> wrote:

> On Thu, Dec 4, 2025 at 4:22 PM Nuno Sá <noname.nuno@...il.com> wrote:
> > On Wed, 2025-12-03 at 14:18 -0500, Kurt Borja wrote:  
> > > In order to improve API consistency with conditional locks, use
> > > true/false return semantics in iio_device_claim_buffer_mode().
> > >
> > > This also matches iio_device_claim_direct() return semantics.  
> 
> > Even if the rest gets a NACK, I think at least this patch makes sense. In fact I
> > would even extend it so that we have the same inline API with proper annotations:
> >
> > https://elixir.bootlin.com/linux/v6.18/source/include/linux/iio/iio.h#L679
> >
> > So it really has the same semantics as iio_device_claim_direct()  
> 
> I remember I looked into this when Jonathan provided an API, but I
> have no memory of why we have the -EBUSY which is not used in the
> callers.

Random historical choice.   I think at the time I vaguely thought
we might have other return values, but they never surfaces so these
might as well have always return booleans.

Jonathan



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ