On 18.12.2023 11:17, Nicola Vetrini wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -4887,8 +4887,6 @@ long arch_memory_op(unsigned long cmd, > XEN_GUEST_HANDLE_PARAM(void) arg) > default: > return subarch_memory_op(cmd, arg); > } > - > - return 0; > }
When a function is small and it's easy to see that all paths return by other means, omitting such a final "return <value>" is imo okay. Here, however, this isn't easy to see, and hence omitting the return is confusing in a different way from having the return. I guess I'll make an alternative change (as iirc I had outlined before), for other x86 maintainers to at least consider. The other alternative (causing less code churn) would imo be to pull out the default case from the switch(). Jan
