[XEN PATCH 4/6] x86/include: address MISRA C:2012 Rule 5.3.

Nicola Vetrini posted 6 patches 2 years, 6 months ago
There is a newer version of this series
[XEN PATCH 4/6] x86/include: address MISRA C:2012 Rule 5.3.
Posted by Nicola Vetrini 2 years, 6 months ago
s/mpc_default_type/mpc_default in 'xen/arch/x86/include/asm/mpspec.h'
to avoid clashing with function parameter names in 'mpparse.c'.

No functional changes.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
Even though the global variable does not seem to be used anywhere and is
perhaps better to remove it entirely.
---
 xen/arch/x86/include/asm/mpspec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/include/asm/mpspec.h b/xen/arch/x86/include/asm/mpspec.h
index 1246eece0b..cc96ee63bd 100644
--- a/xen/arch/x86/include/asm/mpspec.h
+++ b/xen/arch/x86/include/asm/mpspec.h
@@ -15,7 +15,7 @@ extern void get_smp_config (void);
 extern unsigned char apic_version [MAX_APICS];
 extern int mp_irq_entries;
 extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES];
-extern int mpc_default_type;
+extern int mpc_default;
 extern unsigned long mp_lapic_addr;
 extern bool pic_mode;
 
-- 
2.34.1
Re: [XEN PATCH 4/6] x86/include: address MISRA C:2012 Rule 5.3.
Posted by Stefano Stabellini 2 years, 6 months ago
On Fri, 4 Aug 2023, Nicola Vetrini wrote:
> s/mpc_default_type/mpc_default in 'xen/arch/x86/include/asm/mpspec.h'
> to avoid clashing with function parameter names in 'mpparse.c'.
> 
> No functional changes.
> 
> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
> ---
> Even though the global variable does not seem to be used anywhere and is
> perhaps better to remove it entirely.

Please remove it

> ---
>  xen/arch/x86/include/asm/mpspec.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/arch/x86/include/asm/mpspec.h b/xen/arch/x86/include/asm/mpspec.h
> index 1246eece0b..cc96ee63bd 100644
> --- a/xen/arch/x86/include/asm/mpspec.h
> +++ b/xen/arch/x86/include/asm/mpspec.h
> @@ -15,7 +15,7 @@ extern void get_smp_config (void);
>  extern unsigned char apic_version [MAX_APICS];
>  extern int mp_irq_entries;
>  extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES];
> -extern int mpc_default_type;
> +extern int mpc_default;
>  extern unsigned long mp_lapic_addr;
>  extern bool pic_mode;
>  
> -- 
> 2.34.1
>
Re: [XEN PATCH 4/6] x86/include: address MISRA C:2012 Rule 5.3.
Posted by Nicola Vetrini 2 years, 6 months ago
On 04/08/2023 23:24, Stefano Stabellini wrote:
> On Fri, 4 Aug 2023, Nicola Vetrini wrote:
>> s/mpc_default_type/mpc_default in 'xen/arch/x86/include/asm/mpspec.h'
>> to avoid clashing with function parameter names in 'mpparse.c'.
>> 
>> No functional changes.
>> 
>> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
>> ---
>> Even though the global variable does not seem to be used anywhere and 
>> is
>> perhaps better to remove it entirely.
> 
> Please remove it
> 

Noted.

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