Re: [RFC PATCH 00/27] iio: improve handling of direct mode claim and release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 07 Jan 2025 13:09:44 +0000
Nuno Sá <noname.nuno@xxxxxxxxx> wrote:

> On Sun, 2025-01-05 at 17:25 +0000, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > 
> > Note I haven't attempted to CC relevant people for specific drivers.
> > I'll do that for a non RFC version if we move forwards.
> > 
> > Effectively two linked things in this series:
> > 
> > 1) Ripping out iio_device_claim_direct_scoped()
> > 2) Enabling use of sparse to check the claim is always released.
> > 
> > The iio_device_claim_direct_scoped() was an interesting experiment
> > built on conditional scoped guards, but it has been the source of
> > a range of esoteric build warnings and is awkward to use.
> >   
> 
> Curious about one thing... David, wouldn't your work on 'if_not_cond_guard()'
> help with this messy scoped calls? I saw it was not merged yet though... Was it
> dropped for some reason?

Link in cover letter. David's work got merged then reverted :(

https://lore.kernel.org/all/CAHk-=wi8C2yZF_y_T180-v+dSZAhps5QghS_2tKfn-+xAghYPQ@xxxxxxxxxxxxxx/

Basically it seems to be impossible to contrive a way of doing scoped condition
cleanup neatly.  I was also hoping we could transition to the if_cond_guard()
approach to solve the scoped problems. :(

Jonathan


> 
> Anyways, I do like this approach specially due to 2) which, likely, it would not
> be straightforward with automatic cleanups (if feasible at all).
> 
> I plan to go over the whole series in the next few days...
> 
> - Nuno Sá
> 
> 






[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux