From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.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: Fri, 18 Oct 2024 12:15:50 -0700 [thread overview]
Message-ID: <ZxKz5jGCNZSAbNo-@google.com> (raw)
In-Reply-To: <20241018113823.171256-1-przemyslaw.kitszel@intel.com>
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?
Thanks.
--
Dmitry
next prev parent reply other threads:[~2024-10-18 19:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 11:38 [PATCH v4] cleanup: adjust scoped_guard() macros to avoid potential warning Przemek Kitszel
2024-10-18 19:15 ` Dmitry Torokhov [this message]
2024-10-23 10:26 ` Peter Zijlstra
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=ZxKz5jGCNZSAbNo-@google.com \
--to=dmitry.torokhov@gmail.com \
--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=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nex.sw.ncis.osdt.itp.upstreaming@intel.com \
--cc=peterz@infradead.org \
--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;
as well as URLs for NNTP newsgroup(s).