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

Re: [Xen-devel] [PATCH v7 3/6] use is_iommu_enabled() where appropriate...



On 30.08.2019 10:29, Paul Durrant wrote:
> --- a/xen/include/asm-x86/iommu.h
> +++ b/xen/include/asm-x86/iommu.h
> @@ -61,8 +61,17 @@ extern struct iommu_ops iommu_ops;
>  
>  #ifdef NDEBUG
>  # include <asm/alternative.h>
> -# define iommu_call(ops, fn, args...)  alternative_call(iommu_ops.fn, ## 
> args)
> -# define iommu_vcall(ops, fn, args...) alternative_vcall(iommu_ops.fn, ## 
> args)
> +# define iommu_call(ops, fn, args...)         \
> +({                                            \
> +    (void)ops;                                \
> +    alternative_call(iommu_ops.fn, ## args);  \
> +})
> +
> +# define iommu_vcall(ops, fn, args...)        \
> +({                                            \
> +    (void)ops;                                \
> +    alternative_vcall(iommu_ops.fn, ## args); \
> +})
>  #endif

While unlikely to become an issue, "ops" should be parenthesized
here. Also we commonly (but, granted, not consistently) put ({ on
the #define line. Can both be done while committing.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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