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? 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á