|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.9] xsm: fix clang 3.5 build after c47d1d
>>> On 07.04.17 at 16:34, <roger.pau@xxxxxxxxxx> wrote:
> The changes introduced on c47d1d broke the clang build due to undefined
> references to __xsm_action_mismatch_detected, because clang hasn't optimized
> the code properly.
This starts to become annoying.
> --- a/xen/include/xsm/dummy.h
> +++ b/xen/include/xsm/dummy.h
> @@ -557,25 +557,23 @@ static XSM_INLINE int
> xsm_hvm_param_altp2mhvm(XSM_DEFAULT_ARG struct domain *d)
>
> static XSM_INLINE int xsm_hvm_altp2mhvm_op(XSM_DEFAULT_ARG struct domain *d,
> uint64_t mode, uint32_t op)
> {
> - xsm_default_t a;
> XSM_ASSERT_ACTION(XSM_OTHER);
>
> switch ( mode )
> {
> case XEN_ALTP2M_mixed:
> - a = XSM_TARGET;
> - break;
> + return xsm_default_action(XSM_TARGET, current->domain, d);
> case XEN_ALTP2M_external:
> - a = XSM_DM_PRIV;
> + return xsm_default_action(XSM_DM_PRIV, current->domain, d);
> break;
Just like above, this break wants to be eliminated.
> case XEN_ALTP2M_limited:
> - a = (HVMOP_altp2m_vcpu_enable_notify == op) ? XSM_TARGET :
> XSM_DM_PRIV;
> - break;
> + if ( HVMOP_altp2m_vcpu_enable_notify == op )
> + return xsm_default_action(XSM_TARGET, current->domain, d);
> + else
> + return xsm_default_action(XSM_DM_PRIV, current->domain, d);
Could you either keep the conditional expression at least (as a
direct function parameter), or if that still doesn't work at the
minimum drop the pointless "else"?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |