[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZxKz5jGCNZSAbNo-@google.com>
Date: Fri, 18 Oct 2024 12:15:50 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Przemek Kitszel <przemyslaw.kitszel@...el.com>
Cc: linux-kernel@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>,
amadeuszx.slawinski@...ux.intel.com,
Tony Nguyen <anthony.l.nguyen@...el.com>,
nex.sw.ncis.osdt.itp.upstreaming@...el.com, netdev@...r.kernel.org,
Markus Elfring <Markus.Elfring@....de>,
Kees Cook <keescook@...omium.org>,
David Lechner <dlechner@...libre.com>,
Dan Carpenter <dan.carpenter@...aro.org>,
Andy Shevchenko <andriy.shevchenko@...el.com>
Subject: Re: [PATCH v4] cleanup: adjust scoped_guard() macros to avoid
potential warning
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
Powered by blists - more mailing lists