>>> On 24.05.18 at 02:46, <[email protected]> wrote:
> Port WARN_ON_ONCE macro from Linux.

In such a case you should justify adjustments you've made:

> --- a/xen/include/xen/lib.h
> +++ b/xen/include/xen/lib.h
> @@ -11,6 +11,19 @@
>  #define BUG_ON(p)  do { if (unlikely(p)) BUG();  } while (0)
>  #define WARN_ON(p) do { if (unlikely(p)) WARN(); } while (0)
>  
> +#define WARN_ON_ONCE(p)                               \
> +({                                                    \
> +    static bool __section(".data.unlikely") warned;   \

Linux uses .data.once. That or .data.cold would seem better to me than
.data.unlikely.

Jan



_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to