mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	linux-kernel@vger.kernel.org,
	amadeuszx.slawinski@linux.intel.com,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	nex.sw.ncis.osdt.itp.upstreaming@intel.com,
	netdev@vger.kernel.org, Markus Elfring <Markus.Elfring@web.de>,
	Kees Cook <keescook@chromium.org>,
	David Lechner <dlechner@baylibre.com>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@intel.com>
Subject: Re: [PATCH v4] cleanup: adjust scoped_guard() macros to avoid potential warning
Date: Wed, 23 Oct 2024 12:26:20 +0200	[thread overview]
Message-ID: <20241023102620.GI16066@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <ZxKz5jGCNZSAbNo-@google.com>

On Fri, Oct 18, 2024 at 12:15:50PM -0700, Dmitry Torokhov wrote:
> Hi Przemek,
> 
> On Fri, Oct18, 2024 at 01:38:14PM +0200, Przemek Kitszel wrote:
> > Change scoped_guard() and scoped_cond_guard() macros to make reasoning
> > about them easier for static analysis tools (smatch, compiler
> > diagnostics), especially to enable them to tell if the given usage of
> > scoped_guard() is with a conditional lock class (interruptible-locks,
> > try-locks) or not (like simple mutex_lock()).
> 
> Thank you for making all these improvements!
> 
> >  
> > +#define __DEFINE_CLASS_IS_CONDITIONAL(_name, _is_cond)	\
> > +static __maybe_unused const bool class_##_name##_is_conditional = _is_cond
> 
> Question - does this have to be a constant or can it be a macro?

One macro cannot define another.

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 11:38 Przemek Kitszel
2024-10-18 19:15 ` Dmitry Torokhov
2024-10-23 10:26   ` Peter Zijlstra [this message]
2024-10-26  7:35 ` [tip: locking/core] cleanup: Adjust " tip-bot2 for Przemek Kitszel

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=20241023102620.GI16066@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=Markus.Elfring@web.de \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dlechner@baylibre.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nex.sw.ncis.osdt.itp.upstreaming@intel.com \
    --cc=przemyslaw.kitszel@intel.com \
    /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

all inboxes | Powered by JetHome®