All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Simone Ballarin <simone.ballarin@bugseng.com>
Cc: xen-devel@lists.xenproject.org, consulting@bugseng.com,
	Maria Celeste Cesario <maria.celeste.cesario@bugseng.com>,
	Jan Beulich <jbeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>,
	Kevin Tian <kevin.tian@intel.com>
Subject: Re: [PATCH v2 1/2] x86/IOMMU: address violations of MISRA C:2012 Rule 14.4
Date: Tue, 12 Mar 2024 12:01:18 +0100	[thread overview]
Message-ID: <ZfA1_pYQi-aKXH3A@macbook> (raw)
In-Reply-To: <746a33fff1386b2e76657b5f7cfb31f3b117a1fe.1702310368.git.maria.celeste.cesario@bugseng.com>

On Wed, Dec 13, 2023 at 05:10:50PM +0100, Simone Ballarin wrote:
> From: Maria Celeste Cesario <maria.celeste.cesario@bugseng.com>
> 
> The xen sources contain violations of MISRA C:2012 Rule 14.4 whose
> headline states:
> "The controlling expression of an if statement and the controlling
> expression of an iteration-statement shall have essentially Boolean type".
> 
> Add comparisons to avoid using enum constants as controlling expressions
> to comply with Rule 14.4.

If we really want to go this route, we also need to amend the comment
in iommu_intremap definition, as it's no longer valid:

extern enum __packed iommu_intremap {
   /*
    * In order to allow traditional boolean uses of the iommu_intremap
    * variable, the "off" value has to come first (yielding a value of zero).
    */
   iommu_intremap_off,

We no longer allow traditional boolean uses of iommu_intremap.

Thanks, Roger.


  parent reply	other threads:[~2024-03-12 11:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13 16:10 [PATCH v2 0/2] xen: address violations of MISRA C:2012 Rule 14.4 Simone Ballarin
2023-12-13 16:10 ` [PATCH v2 1/2] x86/IOMMU: " Simone Ballarin
2024-02-05 15:36   ` Nicola Vetrini
2024-02-05 15:47     ` Jan Beulich
2024-02-07  0:52       ` Stefano Stabellini
2024-02-07  0:51   ` Stefano Stabellini
2024-02-07  7:20     ` Jan Beulich
2024-03-12 11:01   ` Roger Pau Monné [this message]
2024-03-15 11:20     ` Nicola Vetrini
2023-12-13 16:10 ` [PATCH v2 2/2] xen/x86_emulate: " Simone Ballarin
2023-12-14 10:40   ` Jan Beulich

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=ZfA1_pYQi-aKXH3A@macbook \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=consulting@bugseng.com \
    --cc=jbeulich@suse.com \
    --cc=kevin.tian@intel.com \
    --cc=maria.celeste.cesario@bugseng.com \
    --cc=simone.ballarin@bugseng.com \
    --cc=wl@xen.org \
    --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.