[Nouveau] [PATCH] drm/nouveau: inline nv_printk into nv_assert

Ben Skeggs skeggsb at gmail.com
Thu Sep 13 17:25:11 PDT 2012


On Thu, Sep 13, 2012 at 12:49:23AM +0200, Marcin Slusarz wrote:
> nv_object uses nv_assert, nv_assert uses nv_printk and nv_printk uses
> nv_object - which leads to recursion:
> 
> drivers/gpu/drm/nouveau/core/include/core/object.h:31:1: sorry, unimplemented:
> inlining failed in call to ‘nv_object.constprop.0’: recursive inlining
> 
> As nv_object call from nv_assert is not needed (object is always NULL), inline
> nv_printk into nv_assert.
> 
> It would be good to fold it into commit which introduced logging macros because
> it breaks bisection.
Thanks, squashed into the relevant commit.

> 
> Signed-off-by: Marcin Slusarz <marcin.slusarz at gmail.com>
> ---
>  drivers/gpu/drm/nouveau/core/include/core/printk.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/core/include/core/printk.h b/drivers/gpu/drm/nouveau/core/include/core/printk.h
> index 7deeae2..89eba02 100644
> --- a/drivers/gpu/drm/nouveau/core/include/core/printk.h
> +++ b/drivers/gpu/drm/nouveau/core/include/core/printk.h
> @@ -37,7 +37,8 @@ bool nv_printk_enabled_(struct nouveau_object *object, int level);
>  #define nv_spam(o,f,a...) nv_printk((o), SPAM, f, ##a)
>  
>  #define nv_assert(f,a...) do {                                                 \
> -	nv_printk(NULL, FATAL, f "\n", ##a);                                   \
> +	if (NV_DBG_FATAL <= CONFIG_NOUVEAU_DEBUG)                              \
> +		nv_printk_(NULL, NV_PRINTK_FATAL, NV_DBG_FATAL, f "\n", ##a);  \
>  	BUG_ON(1);                                                             \
>  } while(0)
>  
> -- 
> 1.7.12
> 


More information about the Nouveau mailing list