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: <6d40a735-ad73-4a21-bd66-3af1edd0d1e7@baylibre.com>
Date: Sat, 27 Dec 2025 12:20:51 -0600
From: David Lechner <dlechner@...libre.com>
To: Kurt Borja <kuurtb@...il.com>,
 Andy Shevchenko <andriy.shevchenko@...el.com>,
 Lars-Peter Clausen <lars@...afoo.de>,
 Michael Hennerich <Michael.Hennerich@...log.com>,
 Jonathan Cameron <jic23@...nel.org>, 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>
Cc: 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 v2 4/7] iio: core: Add cleanup.h support for
 iio_device_claim_*()

On 12/27/25 12:04 PM, Kurt Borja wrote:
> On Tue Dec 23, 2025 at 12:23 PM -05, David Lechner wrote:
>> On 12/11/25 8:45 PM, Kurt Borja wrote:
>>> Add guard classes for iio_device_claim_*() conditional locks. This will
>>> aid drivers write safer and cleaner code when dealing with some common
>>> patterns.
>>>
>>

...

>>> + */
>>> +#define IIO_DEV_ACQUIRE_ERR(_var_ptr) \
>>> +	ACQUIRE_ERR(__priv__iio_dev_mode_lock_try_buffer, _var_ptr)
>>
>> There is no error code here, so calling it "ERR" seems wrong.
>> Maybe IIO_DEV_ACQUIRE_FAILED()?
> 
> Here I'd prefer to keep it as _ERR so users can make the immediate
> association. But I don't feel strongly about it.

I'm afraid I fail to make any association with _ERR() and something that
doesn't have an error code.

Is this about following the established pattern with ACQUIRE() and
ACQUIRE_ERR()? Usually, I am strongly in favor of following patterns
like this. But in this case, I just doesn't make logical sense.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ