All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: andrew.cooper3@citrix.com, roger.pau@citrix.com, julien@xen.org,
	george.dunlap@citrix.com, bertrand.marquis@arm.com,
	roberto.bagnara@bugseng.com, nicola.vetrini@bugseng.com,
	Stefano Stabellini <stefano.stabellini@amd.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2] docs/misra: add 14.3
Date: Thu, 31 Aug 2023 11:28:33 +0200	[thread overview]
Message-ID: <58f72b39-701f-6f7a-eba7-fa685d35b8cd@suse.com> (raw)
In-Reply-To: <20230831015316.531167-1-sstabellini@kernel.org>

On 31.08.2023 03:53, Stefano Stabellini wrote:
> @@ -332,6 +333,17 @@ maintainers if you want to suggest a change.
>       - A loop counter shall not have essentially floating type
>       -
>  
> +   * - `Rule 14.3 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_03.c>`_
> +     - Required
> +     - Controlling expressions shall not be invariant
> +     - Due to the extensive usage of IS_ENABLED, sizeof compile-time
> +       checks, and other constructs that are detected as errors by MISRA
> +       C scanners, managing the configuration of a MISRA C scanner for
> +       this rule would be unmanageable. Thus, this rule is adopted with
> +       a project-wide deviation on if and ?: statements.

As before - switch(sizeof(...)) and alike also wants deviating, imo.

> +       while(0) and while(1) are allowed.

... and alike ... (to also cover e.g. while(true)).

Jan


  reply	other threads:[~2023-08-31  9:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31  1:53 [PATCH v2] docs/misra: add 14.3 Stefano Stabellini
2023-08-31  9:28 ` Jan Beulich [this message]
2023-09-07  1:21   ` Stefano Stabellini
2023-09-07  6:45     ` Jan Beulich
  -- strict thread matches above, loose matches on Subject: below --
2023-09-07  1:22 Stefano Stabellini
2023-09-07  7:12 ` Jan Beulich
2023-09-07 21:45   ` Stefano Stabellini
2023-09-08  6:12     ` Jan Beulich
2023-09-08  9:02     ` Nicola Vetrini
2023-09-08 20:27       ` Stefano Stabellini

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=58f72b39-701f-6f7a-eba7-fa685d35b8cd@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=george.dunlap@citrix.com \
    --cc=julien@xen.org \
    --cc=nicola.vetrini@bugseng.com \
    --cc=roberto.bagnara@bugseng.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=stefano.stabellini@amd.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.