[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 6/7] x86/platform: removed break to address MISRA C:2012 Rule 2.1
On 2023-12-12 11:13, Jan Beulich wrote: On 11.12.2023 11:30, Nicola Vetrini wrote:The break statement is redundant, hence it can be removed.Except ...--- a/xen/arch/x86/platform_hypercall.c +++ b/xen/arch/x86/platform_hypercall.c @@ -723,7 +723,6 @@ ret_t do_platform_op( ret = continue_hypercall_on_cpu( 0, cpu_down_helper, (void *)(unsigned long)cpu); - break; } break;... it wants to be the other break that is removed, imo. Andrew, Roger,what do you think? There are many such (again: imo) oddly placed break-sin that switch() ... In some cases there are also inner scopes without there being new local variables in there. IOW imo throughout this switch() - pointless inner scopes want dropping, - all "main" break-s want to have the same indentation. Jan Ok. I'm not particularly keen on doing a full style cleanup; I can drop the other break, for the sake of resolving the MISRA violation, so that the cleanup can happen anytime. -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |