All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: nicola.vetrini@bugseng.com, xen-devel@lists.xenproject.org
Cc: sstabellini@kernel.org, michal.orzel@amd.com,
	xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com,
	consulting@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>,
	"Daniel P. Smith" <dpsmith@apertussolutions.com>,
	"Julien Grall" <julien@xen.org>,
	"Rahul Singh" <rahul.singh@arm.com>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Dario Faggioli" <dfaggioli@suse.com>
Subject: [XEN PATCH 00/10] address some violations of MISRA C Rule 20.7
Date: Mon, 18 Mar 2024 12:53:43 +0100	[thread overview]
Message-ID: <cover.1710762555.git.nicola.vetrini@bugseng.com> (raw)

Hi all,

this series aims to refactor some macros that cause violations of MISRA C Rule
20.7 ("Expressions resulting from the expansion of macro parameters shall be
enclosed in parentheses"). All the macros touched by these patches are in some
way involved in violations, and the strategy adopted to bring them into
compliance is to add parentheses around macro arguments where needed.

Given that the community has previously requested a deviation from the rule, as
stated in docs/misra/deviations.rst, and reported below for convenience [1],
some macro parameters do not need any adjusting (e.g., when used as lhs to
an assignment in statement expressions).

Note that the patch on list.h of the earlier series [2] has been intentionally
left out of this series, because it still needs some adjustments.

[1] - Code violating Rule 20.7 is safe when macro parameters are used:
       (1) as function arguments;
       (2) as macro arguments;
       (3) as array indices;
       (4) as lhs in assignments.
       
[2] https://lore.kernel.org/xen-devel/cover.1709896401.git.nicola.vetrini@bugseng.com/

Nicola Vetrini (10):
  x86/cpufeature: add parentheses to comply with Rule 20.7
  AMD/IOMMU: guest: address violations of MISRA C Rule 20.7
  xen/xsm: add parentheses to comply with MISRA C Rule 20.7
  xen/device_tree: address violations of MISRA C Rule 20.7
  EFI: address violations of MISRA C Rule 20.7
  xen/arm: smmu: address violations of MISRA C Rule 20.7
  xen/efi: efibind: address violations of MISRA C Rule 20.7
  xen/notifier: address violations of MISRA C Rule 20.7
  xen/wait: address violations of MISRA C Rule 20.7
  xen/sched: address violations of MISRA C Rule 20.7

 xen/arch/arm/include/asm/arm64/efibind.h  | 4 ++--
 xen/arch/x86/include/asm/cpufeatureset.h  | 2 +-
 xen/arch/x86/include/asm/x86_64/efibind.h | 4 ++--
 xen/common/sched/private.h                | 2 +-
 xen/drivers/passthrough/amd/iommu_guest.c | 2 +-
 xen/drivers/passthrough/arm/smmu.c        | 2 +-
 xen/include/efi/efierr.h                  | 2 +-
 xen/include/xen/device_tree.h             | 2 +-
 xen/include/xen/notifier.h                | 2 +-
 xen/include/xen/wait.h                    | 4 ++--
 xen/include/xsm/dummy.h                   | 4 ++--
 11 files changed, 15 insertions(+), 15 deletions(-)

-- 
2.34.1


             reply	other threads:[~2024-03-18 11:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 11:53 Nicola Vetrini [this message]
2024-03-18 11:53 ` [XEN PATCH 01/10] x86/cpufeature: add parentheses to comply with Rule 20.7 Nicola Vetrini
2024-03-18 16:42   ` Jan Beulich
2024-03-18 11:53 ` [XEN PATCH 02/10] AMD/IOMMU: guest: address violations of MISRA C " Nicola Vetrini
2024-03-18 16:43   ` Jan Beulich
2024-03-18 11:53 ` [XEN PATCH 03/10] xen/xsm: add parentheses to comply with " Nicola Vetrini
2024-03-19  3:32   ` Stefano Stabellini
2024-03-18 11:53 ` [XEN PATCH 04/10] xen/device_tree: address violations of " Nicola Vetrini
2024-03-19  3:33   ` Stefano Stabellini
2024-03-18 11:53 ` [XEN PATCH 05/10] EFI: " Nicola Vetrini
2024-03-18 16:47   ` Jan Beulich
2024-03-18 11:53 ` [XEN PATCH 06/10] xen/arm: smmu: " Nicola Vetrini
2024-03-19  3:32   ` Stefano Stabellini
2024-03-18 11:53 ` [XEN PATCH 07/10] xen/efi: efibind: " Nicola Vetrini
2024-03-18 16:49   ` Jan Beulich
2024-03-18 17:03     ` Nicola Vetrini
2024-03-18 11:53 ` [XEN PATCH 08/10] xen/notifier: " Nicola Vetrini
2024-03-18 16:50   ` Jan Beulich
2024-03-18 11:53 ` [XEN PATCH 09/10] xen/wait: " Nicola Vetrini
2024-03-18 16:51   ` Jan Beulich
2024-03-18 11:53 ` [XEN PATCH 10/10] xen/sched: " Nicola Vetrini
2024-03-18 12:00   ` George Dunlap
  -- strict thread matches above, loose matches on Subject: below --
2024-02-29 15:27 [XEN PATCH 00/10] address some " Nicola Vetrini

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=cover.1710762555.git.nicola.vetrini@bugseng.com \
    --to=nicola.vetrini@bugseng.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ayan.kumar.halder@amd.com \
    --cc=bertrand.marquis@arm.com \
    --cc=consulting@bugseng.com \
    --cc=dfaggioli@suse.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=rahul.singh@arm.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xenia.ragiadakou@amd.com \
    /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.