diff mbox series

[XEN,v2,3/5] x86/include: address MISRA C:2012 Rule 5.3.

Message ID 4b41f84c6cbce3466917d1091029cacb3c327d7b.1691492441.git.nicola.vetrini@bugseng.com (mailing list archive)
State Superseded
Headers show
Series x86: address MISRA C:2012 Rule 5.3 | expand

Commit Message

Nicola Vetrini Aug. 8, 2023, 11:08 a.m. UTC
Variable 'mpc_default_type' in 'xen/arch/x86/include/asm/mpspec.h'
has no uses and causes shadowing with function parameter names
in 'mpparse.c'. Therefore, it is removed.

No functional changes.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
Changes in v2:
- Removed the variable.
---
 xen/arch/x86/include/asm/mpspec.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Jan Beulich Aug. 8, 2023, 2:01 p.m. UTC | #1
On 08.08.2023 13:08, Nicola Vetrini wrote:
> Variable 'mpc_default_type' in 'xen/arch/x86/include/asm/mpspec.h'
> has no uses and causes shadowing with function parameter names
> in 'mpparse.c'. Therefore, it is removed.

Personally I'd again wish this could be expressed more precisely than
just "variable". What you're removing is a declaration which has no
definition. So aiui shadowing is only one of the concerns Misra would
have here; the lack of a definition would be another.

> No functional changes.
> 
> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/xen/arch/x86/include/asm/mpspec.h b/xen/arch/x86/include/asm/mpspec.h
index 1246eece0b..45e474dfd1 100644
--- a/xen/arch/x86/include/asm/mpspec.h
+++ b/xen/arch/x86/include/asm/mpspec.h
@@ -15,7 +15,6 @@  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 unsigned long mp_lapic_addr;
 extern bool pic_mode;