public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Michael Hennerich" <michael.hennerich@analog.com>,
	linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-cxl@vger.kernel.org, przemyslaw.kitszel@intel.com
Subject: Re: [PATCH 1/3] cleanup: add conditional guard helper
Date: Wed, 23 Oct 2024 12:57:57 +0200	[thread overview]
Message-ID: <20241023105757.GA9767@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <6712b717a9610_10a0a2942e@dwillia2-mobl3.amr.corp.intel.com.notmuch>

On Fri, Oct 18, 2024 at 12:29:27PM -0700, Dan Williams wrote:
> Peter Zijlstra wrote:
> > On Tue, Oct 01, 2024 at 05:30:18PM -0500, David Lechner wrote:
> > > Add a new if_not_cond_guard() macro to cleanup.h for handling
> > > conditional guards such as mutext_trylock().
> > > 
> > > This is more ergonomic than scoped_cond_guard() for most use cases.
> > > Instead of hiding the error handling statement in the macro args, it
> > > works like a normal if statement and allow the error path to be indented
> > > while the normal code flow path is not indented. And it avoid unwanted
> > > side-effect from hidden for loop in scoped_cond_guard().
> > > 
> > > Signed-off-by: David Lechner <dlechner@baylibre.com>
> > > ---
> > >  include/linux/cleanup.h | 11 +++++++++++
> > >  1 file changed, 11 insertions(+)
> > > 
> [..]
> > I've queued these two patches:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
> > 
> > But lacking if_not_guard() users, the robot isn't really going to give
> > me much feedback there, I suppose...
> 
> Looks good. If that branch is rebase-able it would be nice to add some
> credit tags to "cleanup: Add conditional guard helper":
> 
> Co-developed-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
> Signed-off-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
> 
> David and I talked about that here:
> 
> http://lore.kernel.org/f4cc471a-b602-48d8-8323-15efcd602814@baylibre.com
> 
> Also feel free to add:
> 
> Reviewed-by: Dan Williams <dan.j.williams@intel.com>

I rebased because I had to magic in the v4 from Przemek, and I added the
above tags to the if_not_guard() thing.

I've also pushed out a locking/test branch that includes the iio
conversion for the robots.

Once I push to tip/locking/core (people will get robot mail) the commits
should be stable and can be used in other branches if so desired.

  reply	other threads:[~2024-10-23 10:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01 22:30 [PATCH 0/3] cleanup: add if_not_cond_guard macro David Lechner
2024-10-01 22:30 ` [PATCH 1/3] cleanup: add conditional guard helper David Lechner
2024-10-04 17:34   ` Dan Williams
2024-10-04 20:27     ` David Lechner
2024-10-18 11:15   ` Peter Zijlstra
2024-10-18 12:31     ` Przemek Kitszel
2024-10-18 16:29       ` Jonathan Cameron
2024-10-18 19:29     ` Dan Williams
2024-10-23 10:57       ` Peter Zijlstra [this message]
2024-10-26  7:35   ` [tip: locking/core] cleanup: Add " tip-bot2 for David Lechner
2024-10-01 22:30 ` [PATCH 2/3] iio: adc: ad7380: use if_not_cond_guard for claim direct David Lechner
2024-10-03  4:23   ` kernel test robot
2024-10-03  5:35   ` kernel test robot
2024-10-03 14:20     ` David Lechner
2024-10-01 22:30 ` [PATCH 3/3] cxl/region: Use cond_guard() in show_targetN() David Lechner
2024-10-02  2:13 ` [PATCH 0/3] cleanup: add if_not_cond_guard macro Dan Williams
2024-10-06 11:35   ` 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=20241023105757.GA9767@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=dan.j.williams@intel.com \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=nuno.sa@analog.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=torvalds@linux-foundation.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