All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Simone Ballarin <simone.ballarin@bugseng.com>,
	Stefano Stabellini <sstabellini@kernel.org>
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>,
	"Roger Pau Monné" <roger.pau@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: Mon, 05 Feb 2024 16:36:10 +0100	[thread overview]
Message-ID: <891a1ab0b772910999f49878ae679634@bugseng.com> (raw)
In-Reply-To: <746a33fff1386b2e76657b5f7cfb31f3b117a1fe.1702310368.git.maria.celeste.cesario@bugseng.com>

On 2023-12-13 17:10, 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.
> No functional change.
> 
> Signed-off-by: Maria Celeste Cesario  
> <maria.celeste.cesario@bugseng.com>
> Signed-off-by: Simone Ballarin  <simone.ballarin@bugseng.com>
> ---
> Changes in v2
> - rename prefix from AMD/IOMMU to x86/IOMMU
> - move changes on msi.c and hpet.c in this patch.
> ---
>  xen/arch/x86/hpet.c                      | 6 +++---
>  xen/arch/x86/msi.c                       | 4 ++--
>  xen/drivers/passthrough/amd/iommu_init.c | 4 ++--
>  xen/drivers/passthrough/vtd/iommu.c      | 4 ++--
>  xen/drivers/passthrough/vtd/quirks.c     | 2 +-
>  5 files changed, 10 insertions(+), 10 deletions(-)
> 

+Stefano

Hi all,

this patch seems not to have been committed into staging, unlike the 
other patch from this series. Since these are the only remaining 
violations for Rule 14.4, then I think these changes could be reviewed.

This should apply cleanly on staging, but I can send a rebased version 
if there are problems.

Additionally, despite having patches addressing R14.4 already in 
staging, the rule itself is not in docs/misra/rules.rst due to concerns 
on the patch that aimed to add it [1], so it's probably best to send a 
new version of that as well, if Stefano agrees.

[1] 
https://lore.kernel.org/xen-devel/alpine.DEB.2.22.394.2308301840520.6458@ubuntu-linux-20-04-desktop/


-- 
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)


  reply	other threads:[~2024-02-05 15:36 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 [this message]
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é
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=891a1ab0b772910999f49878ae679634@bugseng.com \
    --to=nicola.vetrini@bugseng.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=roger.pau@citrix.com \
    --cc=simone.ballarin@bugseng.com \
    --cc=sstabellini@kernel.org \
    --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.