On 03/08/2023 03:45, Stefano Stabellini wrote:
On Wed, 2 Aug 2023, Nicola Vetrini wrote:
Suitable mechanical renames are made to avoid shadowing, thus
addressing violations of MISRA C:2012 Rule 5.3:
"An identifier declared in an inner scope shall not hide an
identifier declared in an outer scope"
Signed-off-by: Nicola Vetrini <nicola.vetr...@bugseng.com>
---
xen/arch/x86/cpu/mcheck/barrier.c | 8 ++++----
xen/arch/x86/cpu/mcheck/barrier.h | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/xen/arch/x86/cpu/mcheck/barrier.c
b/xen/arch/x86/cpu/mcheck/barrier.c
index a7e5b19a44..51a1d37a76 100644
--- a/xen/arch/x86/cpu/mcheck/barrier.c
+++ b/xen/arch/x86/cpu/mcheck/barrier.c
@@ -16,11 +16,11 @@ void mce_barrier_dec(struct mce_softirq_barrier
*bar)
atomic_dec(&bar->val);
}
-void mce_barrier_enter(struct mce_softirq_barrier *bar, bool wait)
+void mce_barrier_enter(struct mce_softirq_barrier *bar, bool do_wait)
"wait" clashes with xen/common/sched/core.c:wait, which is globally
exported, right?
I think it would be good to add this info to the commit message in this
kind of patches.
Correct, it's in 'xen/include/xen/wait.h' that makes it visible in the
file modified
by the patch. I'll add it in v2.
-void mce_barrier_enter(struct mce_softirq_barrier *, bool wait);
-void mce_barrier_exit(struct mce_softirq_barrier *, bool wait);
+void mce_barrier_enter(struct mce_softirq_barrier *, bool do_wait);
+void mce_barrier_exit(struct mce_softirq_barrier *, bool do_wait);
You might as well add "bar" as first parameter?
void mce_barrier(struct mce_softirq_barrier *);
Will do. I checked that this would not interfere with other patches
related to Rules 8.2 and 8.3.
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)