>>> On 28.08.17 at 13:01, <blacksk...@gmail.com> wrote: > 2017-08-28 16:29 GMT+08:00 Jan Beulich <jbeul...@suse.com>: >>>>> On 27.08.17 at 10:36, <blacksk...@gmail.com> wrote: >>> -static XSM_INLINE int xsm_map_gmfn_foreign(XSM_DEFAULT_ARG struct domain >>> *d, struct domain *t) >>> +static XSM_INLINE int xsm_map_gmfn_foreign(XSM_DEFAULT_ARG struct domain >>> *cd, >>> + struct domain *d, struct domain >>> *t) >>> { >>> + int rc; >>> XSM_ASSERT_ACTION(XSM_TARGET); >> >> Missing blank line between declaration and statements. > > Sorry. Will fix this. > >> >>> - return xsm_default_action(action, d, t); >>> + rc = xsm_default_action(action, cd, d); >>> + if (rc) return rc; >> >> Coding style. In any event, as suggested before the whole thing is >> easier to write as >> >>> + return xsm_default_action(action, cd, t); >> >> return xsm_default_action(action, cd, d) ?: xsm_default_action(action, >> cd, t); > > But aren't we going to preserve the error code here?
I don't understand the question - if the first function invocation returns an error, that is what the function here will return. Else it returns what the second xsm_default_action() invocation hands back. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel