[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 Tue, 12 Dec 2023, 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.

I was also about to comment about which of the two breaks to remove... I
didn't know if there are x86 specific conventions so I didn't say
anything about it. But I also think it is more natural to keep the other
break.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.