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

Re: [Xen-devel] [PATCH v1 4/7] page-alloc: Remove dependency on __LINE__ for release builds



>>> On 06.05.16 at 17:48, <ross.lagerwall@xxxxxxxxxx> wrote:
> --- a/xen/common/page_alloc.c
> +++ b/xen/common/page_alloc.c
> @@ -206,11 +206,19 @@ struct scrub_region {
>  static struct scrub_region __initdata region[MAX_NUMNODES];
>  static unsigned long __initdata chunk_size;
>  
> +#ifdef NDEBUG
> +static void __init boot_bug(void *addr)
> +{
> +    panic("Boot BUG at %p", addr);
> +}
> +#define BOOT_BUG_ON(p) if ( p ) boot_bug(current_text_addr());
> +#else
>  static void __init boot_bug(int line)
>  {
>      panic("Boot BUG at %s:%d", __FILE__, line);
>  }
>  #define BOOT_BUG_ON(p) if ( p ) boot_bug(__LINE__);
> +#endif

Along the lines of the comment on the earlier patch, please try
to limit the #ifdef to just the panic invocation. The function can
easily take both parameters and use just one in each variant.
And of course %ps or %pS and a dependency on CONFIG_XSPLICE
again.

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®.