[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 23.06.16 at 12:36, <andrew.cooper3@xxxxxxxxxx> wrote: > 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. Well, that's what I had put up in the RFC remark. I'm all for consistency, what I'm not sure is whether this ... > Using "goto done;" consistently would be a better option. is better than (always) using plain return where possible. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |