exception to Rule 16.3.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/cpuid.c | 31 +++
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 7290a979c667..0a7c55199f94 100644
--- a/xe
exception to Rule 16.3.
Signed-off-by: Nicola Vetrini
---
The second switch is not the best in terms of readability, so it may
be best to deviate this particular instance.
---
xen/include/xsm/dummy.h | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/xen/include/xsm/dum
hose
files for this guideline.
No functional change.
Signed-off-by: Nicola Vetrini
---
automation/eclair_analysis/ECLAIR/deviations.ecl | 7 +++
docs/misra/deviations.rst| 6 ++
2 files changed, 13 insertions(+)
diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl
b/
.
To avoid this, the construct is deviated with a text-based deviation.
No functional change.
Signed-off-by: Nicola Vetrini
---
I chose a text-based deviation, rather than exempting PROGRESS_VCPU,
because it's more refined and it's unlikely that more violations
are introduced, since the rule has onl
keyword "fallthrough" is an allowed exception to Rule 16.3.
No functional change.
Suggested-by: Jan Beulich
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/hvm/vlapic.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/ar
.
Convert fallthrough comments in other clauses to the pseudo-keyword
while at it.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/common/domctl.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index f2e0e36a17c3..ca
keyword "fallthrough"
is an allowed exception to Rule 16.3.
No functional change.
Signed-off-by: Nicola Vetrini
---
The initialization of irq is due to gcc thinking that irq may be used
uninitizalied in the test after MAP_PIRQ_TYPE_MULTI_MSI
---
xen/arch/x86/irq.c | 9 +++--
1 file
both simply mean we're relying on another compiler extension
that's
not exactly spelled out as such.
Opinions?
Jan
Regardless of whether the compiler will do the right thing or not,
Mandatory guidelines can't be deviated.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
ong and too specific about which patterns were deviated, while also
having a precise record of the MISRA deviations that didn't live in
ECLAIR-specific files. Maybe the use of the pseudo-keyword emerged after
the rule was added to rules.rst, since deviations.rst is updated more
frequently.
--
Ni
On 2024-04-02 17:05, Jan Beulich wrote:
On 29.03.2024 10:11, Nicola Vetrini wrote:
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parentheses". Therefore, some
macro definitions should gain additional parentheses to ensure
gged as v1). All other patches are new in this series and are
pairwise indipendent.
Nicola Vetrini (7):
x86/msi: address violation of MISRA C Rule 20.7 and coding style
arm/public: address violations of MISRA C Rule 20.7
x86/vPMU: address violations of MISRA C Rule 20.7
x86/hvm: address
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/public/arch-arm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index a2
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/hvm/domain.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/hvm/domain.c b/xen/arch/x86/hvm/domain.c
index 7f6e362a702e..b9
of alternative_{call,vcall}[0-9] macros.
The existing configuration for R20.7 is reordered so that it matches the
cases listed in its documentation comment.
Signed-off-by: Nicola Vetrini
---
.../eclair_analysis/ECLAIR/deviations.ecl | 25 +--
docs/misra/deviations.rst
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/include/asm/amd.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/include/asm/amd.h b/xen/arch/x86/include/asm/amd.h
index 2c
n possibly alter the semantics of the passed-in macro parameter.
While at it, the style of these macros has been somewhat uniformed.
No functional change.
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- Make the style change more consistent
---
xen/arch/x86/include/asm/
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/include/asm/vpmu.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/include/asm/vpmu.h b/xen/arch/x86/include/asm/vpmu.h
index f2
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/xen/mm.h | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h
index 3e84960a365f..7561297a7
ded where needed, as
suggested earlier, and then you can submit a further cleanup patch to
remove e.g. the open coding?
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
On 2024-03-26 16:35, Jan Beulich wrote:
On 26.03.2024 16:27, Nicola Vetrini wrote:
On 2024-03-25 10:27, Jan Beulich wrote:
On 22.03.2024 17:01, Nicola Vetrini wrote:
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -150,7 +150,7 @@
#include
#else
#define
On 2024-03-26 16:13, Jan Beulich wrote:
On 26.03.2024 15:30, Nicola Vetrini wrote:
On 2024-03-26 11:05, Jan Beulich wrote:
On 22.03.2024 17:01, Nicola Vetrini wrote:
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parent
Hi Jan,
sorry, forgot to reply.
On 2024-03-25 10:27, Jan Beulich wrote:
On 22.03.2024 17:01, Nicola Vetrini wrote:
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -150,7 +150,7 @@
#include
#else
#define p2m_pod_offline_or_broken_hit(pg) 0
Seeing this in context: Does
On 2024-03-26 11:15, Jan Beulich wrote:
On 22.03.2024 17:02, Nicola Vetrini wrote:
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parentheses". Therefore, some
macro definitions should gain additional parentheses to ensure
On 2024-03-26 11:13, Jan Beulich wrote:
On 22.03.2024 17:01, Nicola Vetrini wrote:
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parentheses". Therefore, some
macro definitions should gain additional parentheses to ensure
On 2024-03-26 11:05, Jan Beulich wrote:
On 22.03.2024 17:01, Nicola Vetrini wrote:
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parentheses". Therefore, some
macro definitions should gain additional parentheses to ensure
On 2024-03-25 15:58, Jan Beulich wrote:
On 25.03.2024 15:47, Nicola Vetrini wrote:
On 2024-03-25 10:38, Jan Beulich wrote:
On 22.03.2024 17:01, Nicola Vetrini wrote:
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parent
On 2024-03-25 10:38, Jan Beulich wrote:
On 22.03.2024 17:01, Nicola Vetrini wrote:
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parentheses". Therefore, some
macro definitions should gain additional parentheses to ensure
On 2024-03-25 10:25, Jan Beulich wrote:
On 22.03.2024 17:01, Nicola Vetrini wrote:
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parentheses". Therefore, some
macro definitions should gain additional parentheses to ensure
On 2024-03-25 09:00, Jan Beulich wrote:
On 22.03.2024 17:01, Nicola Vetrini wrote:
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
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/public/trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/include/public/trace.h b/xen/include/public/trace.h
index 62a179971d2a..3c9f9c3c1
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/efi/efiapi.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/include/efi/efiapi.h b/xen/include/efi/efiapi.h
index a616d1238aa4..6d4d4e340
el.org/xen-devel/cover.1710762555.git.nicola.vetr...@bugseng.com/
Nicola Vetrini (11):
xen/list: address violations of MISRA C Rule 20.7
xen/xsm: add parentheses to comply with MISRA C Rule 20.7
xen/efi: efibind: address violations of MISRA C Rule 20.7
xentrace: address violation of MISRA C
n possibly alter the semantics of the passed-in macro parameter.
While at it, the style of these macros has been somewhat uniformed.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/include/asm/msi.h | 47 +-
1 file changed, 24 insertions(+), 23
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/include/asm/alternative.h | 76 +-
1 file changed, 38 insertions(+), 38 deletions(-)
diff --git a/xen/arch/x86/include/asm/alternative.h
b/xe
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
Reviewed-by: Stefano Stabellini
---
xen/include/xsm/dummy.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dum
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
Acked-by: Jan Beulich
---
This file is matched by exclude-list.json, but the fix is rather trivial
and impacts code that in under the scope of MISRA compliance.
---
xen/arch/arm/i
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/scripts/gen_hypercall.awk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/scripts/gen_hypercall.awk b/xen/scripts/gen_hypercall.awk
index 9f
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- changes to list.h are all in this patch;
- Parenthesized some instances of "pos" and "n" even when already
covered by the deviati
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/hvm/hvm.c | 6 +++---
xen/arch/x86/include/asm/hvm/save.h | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/hvm/hvm.c
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/common/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 28c510d6669b..82dc55829
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/public/arch-x86/xen.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/include/public/arch-x86/xen.h
b/xen/include/public/arch-x86/x
On 2024-03-20 12:01, Nicola Vetrini wrote:
On 2024-03-18 17:35, Andrew Cooper wrote:
Rework the trace API to unify it (remove the HVM specific
obfuscation), and
remove MISRA violations.
v3:
* Delete TRACE_PARAM64()
Andrew Cooper (7):
xen/trace: Introduce new API
xen/credit2: Clean up
especially on Rule 20.7.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
On 2024-03-18 17:49, Jan Beulich wrote:
On 18.03.2024 12:53, Nicola Vetrini wrote:
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parentheses". Therefore, some
macro definitions should gain additional parentheses to ensure
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
This local helper may disappear as a follow-up to [1], if the function that
remains there after the cleanup ends up being removed, so this patch has a
slight
dependency on what
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/xsm/dummy.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 8671af1ba4d3..88039fdd2
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
This file is matched by exclude-list.json, but the fix is rather trivial
and actually benefits code that is in scope for compliance.
---
xen/include/efi/efierr.h | 2 +-
1 file
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
This file is matched by exclude-list.json, but the fix is rather trivial
and impacts code that in under the scope of MISRA compliance.
---
xen/arch/arm/include/asm/arm64/efib
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/xen/notifier.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/include/xen/notifier.h b/xen/include/xen/notifier.h
index 2a952484df43..05359e8a8
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/xen/wait.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/include/xen/wait.h b/xen/include/xen/wait.h
index 6eb7667d9c7f..1c68bc564
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/drivers/passthrough/arm/smmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/drivers/passthrough/arm/smmu.c
b/xen/drivers/passthrough/arm/sm
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/common/sched/private.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/common/sched/private.h b/xen/common/sched/private.h
index 459d1dfb11a5..c0e7c96d2
(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.vetr...@bugseng.com/
Nicola Vetrini (10):
x86/cpufeature: add parentheses to comply with Rule 20.7
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
This patch uniforms the way these macros use parentheses, skipping the
already deviated cases of the lhs of an assignment. In principle, all
three could have the parentheses on
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/arch/x86/include/asm/cpufeatureset.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/include/asm/cpufeatureset.h
b/xen/arch/x86/i
Delete unused functions from 'iommu_guest.c'.
No functional change.
Signed-off-by: Nicola Vetrini
---
guest_iommu_add_ptr_log has still one caller, but even that seems
suspicious. I left it in and uniformed its parameter type at the
moment, so that whether it should be kept can be sorted out
On 2024-03-15 14:31, Jan Beulich wrote:
On 15.03.2024 12:16, Nicola Vetrini wrote:
Delete unused functions from 'iommu_guest.c'.
The 'cmd' parameter of amd_iommu_send_guest_cmd is passed
to a function that expects arrays of size 4, therefore
specifying explicitly the size also
mu_intremap.
Thanks, Roger.
Noted, thanks.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
.
Signed-off-by: Nicola Vetrini
---
All current users of amd_iommu_send_guest pass an array of size 4,
hence this is fixing a potential issue noticed by the analyzer for MISRA C
Rule 17.5, not an actual bug.
guest_iommu_add_ptr_log has still one caller, but even that seems
suspicious. I left
On 2024-03-14 09:32, Jan Beulich wrote:
On 14.03.2024 08:42, Nicola Vetrini wrote:
The 'cmd' parameter of amd_iommu_send_guest_cmd is passed
to a function that expects arrays of size 4, therefore
specifying explicitly the size also in amd_iommu_send_guest_cmd
allows not to accidentally pass
tly.
No functional change.
Signed-off-by: Nicola Vetrini
---
All current users pass an array of size 4, hence this patch is addressing
a potential issue noticed by the analyzer in the context of Rule 17.5
("The function argument corresponding to a parameter declared to have an array
type sh
On 2024-02-15 14:06, Nicola Vetrini wrote:
Certain macros are allowed to violate the Rule, since their meaning and
intended use is well-known to all Xen developers.
Variadic macros that rely on the GCC extension for removing a trailing
comma when token pasting the variable argument
On 2024-03-12 12:25, Jan Beulich wrote:
On 12.03.2024 12:13, Nicola Vetrini wrote:
Rule 20.4 states: "A macro shall not be defined with the same name
as a keyword".
Defining this macro with the same name as the inline keyword
allows for additionally checking that out-of-lined sta
ive impact on the overall safety. See [1] for additional
context on the motivation of this deviation.
No functional change.
[1]
https://lore.kernel.org/xen-devel/adaa6d55-266d-4df8-8967-9340080d1...@citrix.com/
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- Rephrased SAF comment to be mo
On 2024-03-11 08:32, Jan Beulich wrote:
On 08.03.2024 09:10, Nicola Vetrini wrote:
Rule 20.4 states: "A macro shall not be defined with the same name
as a keyword".
Defining this macro with the same name as the inline keyword
allows for additionally checking that out-of-lined sta
On 2024-03-11 08:48, Jan Beulich wrote:
On 08.03.2024 12:21, Nicola Vetrini wrote:
--- a/xen/include/xen/list.h
+++ b/xen/include/xen/list.h
@@ -479,9 +479,9 @@ static inline void list_splice_init(struct
list_head *list,
* @n: another list_head to use as temporary storage
* @head
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/xen/param.h | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/xen/include/xen/param.h b/xen/include/xen/param.h
index 13
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
Style in arm64/cpufeature.c has not been amended, because this file seems
to be kept in sync with its Linux counterpart.
Changes in v2:
- Added parentheses for consistency
---
xe
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- split from an earlier patch
---
xen/include/xen/bug.h | 2 +-
xen/include/xen/init.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/x
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
Reviewed-by: Stefano Stabellini
---
xen/drivers/passthrough/arm/smmu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/drivers/passthrough/arm/smmu.c
b/x
ot;.
- Dropped GUARD(1) hunk from the x86 patch.
- Dropped patch 4, 5 and 10: they will be subject to a deviation in the future.
- Patch 7, 8, 9 have been committed already.
Nicola Vetrini (7):
xen/spinlock: address violations of MISRA C Rule 20.7
xen/include: address violations of MISRA C
shall
be enclosed in parentheses").
No functional change.
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- dropped the controversial GUARD(1) hunk
---
xen/arch/x86/include/asm/irq.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/include/asm/irq.h b/xe
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
Changes in v2:
- changes to list.h are all in this patch;
- Parenthesized some instances of "pos" and "n" even when already
covered by the deviati
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/xen/spinlock.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h
index 1cd9120eac7a..0e6a083df
ive impact on the overall safety. See [1] for additional
context on the motivation of this deviation.
No functional change.
[1]
https://lore.kernel.org/xen-devel/adaa6d55-266d-4df8-8967-9340080d1...@citrix.com/
Signed-off-by: Nicola Vetrini
---
docs/misra/safe.json | 8
xen/i
wrote:
On 29.02.2024 23:57, Stefano Stabellini wrote:
On Thu, 29 Feb 2024, Nicola Vetrini wrote:
MISRA C Rule 20.7 states: "Expressions resulting from the
expansion
of macro parameters shall be enclosed in parentheses".
Therefore, some
macro definitions should gain additional p
On 2024-03-05 11:26, Jan Beulich wrote:
On 05.03.2024 11:21, Nicola Vetrini wrote:
On 2024-02-29 23:49, Stefano Stabellini wrote:
On Thu, 29 Feb 2024, Nicola Vetrini wrote:
On 2024-02-29 17:40, Jan Beulich wrote:
On 29.02.2024 16:27, Nicola Vetrini wrote:
--- a/xen/include/public/xen.h
On 2024-02-29 18:05, Jan Beulich wrote:
On 29.02.2024 17:45, Nicola Vetrini wrote:
On 2024-02-29 17:37, Jan Beulich wrote:
On 29.02.2024 16:27, Nicola Vetrini wrote:
--- a/xen/arch/x86/include/asm/irq.h
+++ b/xen/arch/x86/include/asm/irq.h
@@ -179,9 +179,9 @@ void cleanup_domain_irq_mapping
On 2024-03-05 02:43, Stefano Stabellini wrote:
On Mon, 4 Mar 2024, Nicola Vetrini wrote:
Hi,
as the maintainers of this subsystem, would you prefer Jan's version
or the
one in the patch?
Both are fine w.r.t MISRA Rule 20.7 because the macro arguments
themselves are
parenthesized.
I
On 2024-02-29 23:53, Stefano Stabellini wrote:
On Thu, 29 Feb 2024, Nicola Vetrini wrote:
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parentheses". Therefore, some
macro definitions should gain additional parentheses
On 2024-02-29 23:49, Stefano Stabellini wrote:
On Thu, 29 Feb 2024, Nicola Vetrini wrote:
On 2024-02-29 17:40, Jan Beulich wrote:
> On 29.02.2024 16:27, Nicola Vetrini wrote:
> > --- a/xen/include/public/xen.h
> > +++ b/xen/include/public/xen.h
> > @@ -988,7 +98
parentheses are not required, but I can add them if the
maintainers share your view.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
On 2024-02-29 17:34, Jan Beulich wrote:
On 29.02.2024 16:27, Nicola Vetrini wrote:
--- a/xen/arch/arm/cpuerrata.c
+++ b/xen/arch/arm/cpuerrata.c
@@ -462,8 +462,8 @@ static bool has_ssbd_mitigation(const struct
arm_cpu_capabilities *entry)
#define MIDR_RANGE(model, min, max
named macros
in xen/arch/x86/include/asm/hvm/trace.h
Andrew Cooper:
sigh - I'm half way through deleting all of that
guess I ought to finish
Andrew Cooper:
@Nicola Vetrini:
https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/xen-trace
On second thoughts
On 2024-02-29 23:55, Stefano Stabellini wrote:
On Thu, 29 Feb 2024, Nicola Vetrini wrote:
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parentheses". Therefore, some
macro definitions should gain additional parentheses
/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_20_13.c>`_
- Required
- A line whose first token is # shall be a valid preprocessing
--
2.25.1
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
On 2024-02-29 17:47, Andrew Cooper wrote:
On 29/02/2024 4:21 pm, Nicola Vetrini wrote:
On 2024-02-29 17:10, Andrew Cooper wrote:
On 29/02/2024 3:27 pm, Nicola Vetrini wrote:
diff --git a/xen/include/xen/kconfig.h b/xen/include/xen/kconfig.h
index c25dc0f6c2a9..b7e70289737b 100644
--- a/xen
On 2024-02-29 17:42, Jan Beulich wrote:
On 29.02.2024 16:27, Nicola Vetrini wrote:
--- a/xen/common/perfc.c
+++ b/xen/common/perfc.c
@@ -10,10 +10,10 @@
#include
#include
-#define PERFCOUNTER( var, name ) { name, TYPE_SINGLE, 0
},
-#define PERFCOUNTER_ARRAY( var, name, size
On 2024-02-29 17:40, Jan Beulich wrote:
On 29.02.2024 16:27, Nicola Vetrini wrote:
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -988,7 +988,7 @@ typedef struct {
((b) >> 8) & 0xFF, ((b) >> 0) & 0xFF,
\
((c) >&
On 2024-02-29 17:37, Jan Beulich wrote:
On 29.02.2024 16:27, Nicola Vetrini wrote:
--- a/xen/arch/x86/include/asm/irq.h
+++ b/xen/arch/x86/include/asm/irq.h
@@ -179,9 +179,9 @@ void cleanup_domain_irq_mapping(struct domain *d);
void *__ret = radix_tree_lookup(&(d)->arch.hvm.emui
On 2024-02-29 17:25, Jan Beulich wrote:
On 29.02.2024 16:27, Nicola Vetrini wrote:
--- a/xen/include/xen/kconfig.h
+++ b/xen/include/xen/kconfig.h
@@ -25,7 +25,7 @@
#define __ARG_PLACEHOLDER_1 0,
#define config_enabled(cfg) _config_enabled(cfg)
#define _config_enabled(value
On 2024-02-29 17:10, Andrew Cooper wrote:
On 29/02/2024 3:27 pm, Nicola Vetrini wrote:
diff --git a/xen/include/xen/kconfig.h b/xen/include/xen/kconfig.h
index c25dc0f6c2a9..b7e70289737b 100644
--- a/xen/include/xen/kconfig.h
+++ b/xen/include/xen/kconfig.h
@@ -25,7 +25,7 @@
#define
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/drivers/passthrough/arm/smmu-v3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/drivers/passthrough/arm/smmu-v3.c
b/xen/drivers/passthrough/arm/smmu-
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/xen/bug.h | 2 +-
xen/include/xen/init.h | 4 +--
xen/include/xen/kconfig.h | 2 +-
xen/include/xen/list.h | 59 +++--
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/xen/tasklet.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/include/xen/tasklet.h b/xen/include/xen/tasklet.h
index 593d6a2400fb..78760b694
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parentheses". Therefore
the macro XEN_DEFINE_UUID_ should wrap its parameters in parentheses.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/public/xen.h
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/common/perfc.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/common/perfc.c b/xen/common/perfc.c
index 7400667bf0c4..02f4fc8fe032 100644
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/common/keyhandler.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 127ca506965c..4c1ce0078
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
Style in arm64/cpufeature.c has not been amended, because this file seems
to be kept in sync with its Linux counterpart.
---
xen/arch/arm/arm64/cpufeature.c | 14 +++--
n possibly alter the semantics of the passed-in macro parameter.
No functional change.
Signed-off-by: Nicola Vetrini
---
xen/include/xen/errno.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/include/xen/errno.h b/xen/include/xen/errno.h
index 69b28dd3c6c5..506674701
101 - 200 of 946 matches
Mail list logo