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

Re: [Xen-devel] [PATCH v2 4/6] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin



>>> On 28.08.17 at 13:01, <blackskygg@xxxxxxxxx> wrote:
> 2017-08-28 16:29 GMT+08:00 Jan Beulich <JBeulich@xxxxxxxx>:
>>>>> On 27.08.17 at 10:36, <blackskygg@xxxxxxxxx> 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@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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