Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"Nuno Sá" <noname.nuno@gmail.com>,
	"David Lechner" <dlechner@baylibre.com>,
	linux-iio@vger.kernel.org,
	"Cosmin Tanislav" <demonsingur@gmail.com>,
	"Jagath Jog J" <jagathjog1996@gmail.com>,
	"Gwendal Grignou" <gwendal@chromium.org>,
	"Daniel Campello" <campello@chromium.org>,
	gregkh@linuxfoundation.org
Subject: Re: [RFC PATCH 1/8] iio: locking: introduce __cleanup() based direct mode claiming infrastructure
Date: Fri, 3 Nov 2023 15:19:57 +0000	[thread overview]
Message-ID: <20231103151957.00001f2e@Huawei.com> (raw)
In-Reply-To: <20231102104848.GA3818@noisy.programming.kicks-ass.net>

On Thu, 2 Nov 2023 11:48:48 +0100
Peter Zijlstra <peterz@infradead.org> wrote:

> On Sat, Oct 28, 2023 at 05:59:28PM +0100, Jonathan Cameron wrote:
> 
> > #define scoped_cond_guard_call(_name, _call, args...) \
> > +	for (CLASS(_name, scope)(args), \
> > +	     *done = NULL; !done; done = (void *)1) \
> > +		if (!__guard_ptr(_name)(&scope)) _call; \
> > +		else
> > 
> > Totally untested but hopefully conveys the idea (which is a tiny
> > extension of your scoped_cond_guard)  
> 
> It's a statement not a call, but yeah, I've done something like this,
> even made one of my cases simpler too,

Good point.

> 
> Let me got post this stuff so we can get it merged.
> 

Great.  I really like this whole effort, so thanks for working on it
and your feedback here.

Jonathan


  reply	other threads:[~2023-11-03 15:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-22 15:47 [RFC PATCH 0/8] IIO: Use the new cleanup.h magic Jonathan Cameron
2023-10-22 15:47 ` [RFC PATCH 1/8] iio: locking: introduce __cleanup() based direct mode claiming infrastructure Jonathan Cameron
2023-10-22 21:10   ` David Lechner
2023-10-23  8:55     ` Nuno Sá
2023-10-23  9:53       ` Jonathan Cameron
2023-10-23 11:51         ` Nuno Sá
2023-10-23 14:34           ` Jonathan Cameron
2023-10-23 14:58             ` Nuno Sá
2023-10-24 12:23               ` Jonathan Cameron
2023-10-25  7:24                 ` Nuno Sá
2023-10-24 15:11       ` Peter Zijlstra
2023-10-24 15:28         ` Peter Zijlstra
2023-10-28 16:59           ` Jonathan Cameron
2023-11-02 10:48             ` Peter Zijlstra
2023-11-03 15:19               ` Jonathan Cameron [this message]
2023-10-23  9:49     ` Jonathan Cameron
2023-10-22 15:47 ` [RFC PATCH 2/8] iio: dummy: Add use of new automated cleanup of locks and direct mode claiming Jonathan Cameron
2023-10-22 15:47 ` [RFC PATCH 3/8] iio: accel: adxl367: Use automated cleanup for locks and iio direct mode Jonathan Cameron
2023-10-22 15:47 ` [RFC PATCH 4/8] iio: imu: bmi323: Use cleanup handling for iio_device_claim_direct_mode() Jonathan Cameron
2023-10-22 15:47 ` [RFC PATCH 5/8] iio: adc: max1363: Use automatic cleanup for locks and iio mode claiming Jonathan Cameron
2023-10-22 15:47 ` [RFC PATCH 6/8] iio: proximity: sx9360: Use automated cleanup for locks and IIO " Jonathan Cameron
2023-10-22 15:47 ` [RFC PATCH 7/8] iio: proximity: sx9324: " Jonathan Cameron
2023-10-22 15:47 ` [RFC PATCH 8/8] iio: proximity: sx9310: " Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231103151957.00001f2e@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=campello@chromium.org \
    --cc=demonsingur@gmail.com \
    --cc=dlechner@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gwendal@chromium.org \
    --cc=jagathjog1996@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=noname.nuno@gmail.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox