[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/4] x86emul: use (locally) consistent exit mechanisms



On 20/06/16 12:58, Jan Beulich wrote:
> At least similar code should use similar exit mechanisms (return vs
> goto).
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> RFC reason: There are many more paths where we could return directly,
>             avoiding the _put_fpu() and put_stub(). Otoh arguably the
>             two existing return-s around the changes below could also
>             be changed to "goto done" to restore consistency.
>
> Subsequently we may then want to consider to reduce the number of
> "goto done" by checking rc right after at least the main switch()
> statements.

I think this patch goes in the wrong direction.  Mixing exit mechanisms
makes code harder to interpret, and x86_emulate() isn't the easiest
function to edit.

Using "goto done;" consistently would be a better option.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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