On 2024-09-10 06:39, Stefano Stabellini wrote:
Acked-by: Stefano Stabellini <sstabell...@kernel.org>
On Mon, 9 Sep 2024, Jan Beulich wrote:
On 08.09.2024 15:27, Nicola Vetrini wrote:
> --- a/docs/misra/deviations.rst
> +++ b/docs/misra/deviations.rst
> @@ -533,6 +533,14 @@ Deviations related to MISRA C:2012 Rules:
> to incur in the risk of being misused or lead to developer confusion,
and
> refactoring it to add parentheses breaks its functionality.
> - Tagged as `safe` for ECLAIR.
> +
> + * - R20.7
> + - The macros `{COMPILE,RUNTIME}_CHECK` defined in
> + `xen/include/xen/self-tests.h` are allowed not to parenthesize their
> + arguments, to allow function-like macros to be tested as well as
> + functions. Given the specialized use of these macros and their limited
> + usage scope, omitting parentheses is deemed unlikely to cause issues.
> + - Tagged as `deliberate` for ECLAIR.
As on earlier occasions my take here again is that this is going too
far:
Beside the "fn" parameter, all other parameter uses should be properly
parenthesized. I have no idea whether this can be expressed for
Eclair,
but at least the verbal deviation description should imo be no more
lax
than necessary.
I can add a mention to the "fn" parameter on commit
I am ok with that. Unfortunately configuring the tool to only require
certain parameters to be non-parenthesized is not possible at the
moment, but it's something that may be considered in the future.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)