On Mon, 2017-10-16 at 18:26 +0300, Mika Kuoppala wrote:
> It is easier to categorize and debug bugs if the failed condition
> is in plain sight in the actual dmesg output. Make it so.
> 
> Cc: Chris Wilson <ch...@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuopp...@linux.intel.com>

<SNIP>

That's one off my TODO list. This would make life easier for CI people.

> @@ -28,7 +28,10 @@
>  #include <linux/bug.h>
>  
>  #ifdef CONFIG_DRM_I915_DEBUG_GEM
> -#define GEM_BUG_ON(expr) BUG_ON(expr)
> +#define GEM_BUG_ON(condition) do { if (unlikely(condition)) { \
> +             printk(KERN_ERR "GEM_BUG: %s\n", __stringify(condition)); 
> BUG(); \
> +             } \
> +     } while(0)

To keep style consistent with WARN_ON make it;

        printk(KERN_ERR "GEM_BUG_ON(%s)\n", __stringify(condition)) 

Then, this is;

Reviewed-by: Joonas Lahtinen <joonas.lahti...@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to