<p dir="ltr"></p>
<p dir="ltr">On Aug 19, 2016 12:37 AM, "Chris Wilson" <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>> wrote:<br>
><br>
> Since dev_printk likes to print "(NULL device *):" when passed in a NULL<br>
> pointer, we have to manually call printk() ourselves.<br>
><br>
> Fixes: c4e68a583202 ("drm: Introduce DRM_DEV_* log messages")<br>
> Signed-off-by: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>><br>
> Cc: Eric Engestrom <<a href="mailto:eric.engestrom@imgtec.com">eric.engestrom@imgtec.com</a>><br>
> Cc: Sean Paul <<a href="mailto:seanpaul@chromium.org">seanpaul@chromium.org</a>><br></p>
<p dir="ltr">Thanks for fixing this, Chris.</p>
<p dir="ltr">Reviewed-by: Sean Paul <<a href="mailto:seanpaul@chromium.org">seanpaul@chromium.org</a>></p>
<p dir="ltr">> ---<br>
> drivers/gpu/drm/drm_drv.c | 7 +++++--<br>
> 1 file changed, 5 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c<br>
> index a7f628298365..acf6a5f38920 100644<br>
> --- a/drivers/gpu/drm/drm_drv.c<br>
> +++ b/drivers/gpu/drm/drm_drv.c<br>
> @@ -79,8 +79,11 @@ void drm_dev_printk(const struct device *dev, const char *level,<br>
> vaf.fmt = format;<br>
> <a href="http://vaf.va">vaf.va</a> = &args;<br>
><br>
> - dev_printk(level, dev, DRM_PRINTK_FMT, function_name, prefix,<br>
> - &vaf);<br>
> + if (dev)<br>
> + dev_printk(level, dev, DRM_PRINTK_FMT, function_name, prefix,<br>
> + &vaf);<br>
> + else<br>
> + printk("%s" DRM_PRINTK_FMT, level, function_name, prefix, &vaf);<br>
><br>
> va_end(args);<br>
> }<br>
> --<br>
> 2.9.3<br>
></p>