Re: [XEN PATCH v2 4/9] x86/efi: tidy switch statement and address MISRA violation

2024-04-08 Thread Stefano Stabellini
On Mon, 8 Apr 2024, Jan Beulich wrote: > On 05.04.2024 11:14, Nicola Vetrini wrote: > > --- a/xen/arch/x86/efi/efi-boot.h > > +++ b/xen/arch/x86/efi/efi-boot.h > > @@ -169,20 +169,22 @@ static void __init > > efi_arch_process_memory_map(EFI_SYSTEM_TABLE *SystemTable, > > > > switch (

Re: [XEN PATCH v2 4/9] x86/efi: tidy switch statement and address MISRA violation

2024-04-08 Thread Jan Beulich
On 05.04.2024 11:14, Nicola Vetrini wrote: > --- a/xen/arch/x86/efi/efi-boot.h > +++ b/xen/arch/x86/efi/efi-boot.h > @@ -169,20 +169,22 @@ static void __init > efi_arch_process_memory_map(EFI_SYSTEM_TABLE *SystemTable, > > switch ( desc->Type ) > { > +default: > +

[XEN PATCH v2 4/9] x86/efi: tidy switch statement and address MISRA violation

2024-04-05 Thread Nicola Vetrini
Refactor the first clauses so that a violation of MISRA C Rule 16.2 is resolved (a switch label, "default" in this case, should be immediately enclosed in the compound statement of the switch). Note that the switch clause ending with the pseudo keyword "fallthrough" is an allowed exception to Rule