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

Re: [Xen-devel] [PATCH v4 06/34] x86/arm: Add BUGFRAME_NR define and BUILD checks.



>>> On 15.03.16 at 18:56, <konrad.wilk@xxxxxxxxxx> wrote:
> --- a/xen/include/asm-arm/bug.h
> +++ b/xen/include/asm-arm/bug.h
> @@ -31,6 +31,7 @@ struct bug_frame {
>  #define BUGFRAME_warn   0
>  #define BUGFRAME_bug    1
>  #define BUGFRAME_assert 2
> +#define BUGFRAME_NR     3
>  
>  /* Many versions of GCC doesn't support the asm %c parameter which would
>   * be preferable to this unpleasantness. We use mergeable string
> @@ -39,6 +40,7 @@ struct bug_frame {
>   */
>  #define BUG_FRAME(type, line, file, has_msg, msg) do {                      \
>      BUILD_BUG_ON((line) >> 16);                                             \
> +    BUILD_BUG_ON(type >= BUGFRAME_NR);                                      \

The x86 variant has type properly parenthesized - why not here?

> --- a/xen/include/asm-x86/bug.h
> +++ b/xen/include/asm-x86/bug.h
> @@ -9,7 +9,7 @@
>  #define BUGFRAME_warn   1
>  #define BUGFRAME_bug    2
>  #define BUGFRAME_assert 3
> -
> +#define BUGFRAME_NR     4
>  #ifndef __ASSEMBLY__

Please retain the blank line.

> @@ -51,6 +51,7 @@ struct bug_frame {
>  
>  #define BUG_FRAME(type, line, ptr, second_frame, msg) do {                   
> \
>      BUILD_BUG_ON((line) >> (BUG_LINE_LO_WIDTH + BUG_LINE_HI_WIDTH));         
> \
> +    BUILD_BUG_ON((type) >= (BUGFRAME_NR));                                   
> \

The ARM variant has BUGFRAME_NR properly un-parenthesized -
why here?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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