[PATCH v3 1/2] drm: Introduce DRM_DEV_* log messages

Eric Engestrom eric.engestrom at imgtec.com
Mon Aug 15 05:54:52 PDT 2016


On Fri, Aug 12, 2016 at 04:29:37PM -0400, Sean Paul wrote:
> This patch consolidates all the various log functions/macros into
> one uber function, drm_printk. It also introduces some new DRM_DEV_*
> variants that use dev_printk to print the device name, which helps
> delineate multiple devices of the same type.
> 
> Signed-off-by: Sean Paul <seanpaul at chromium.org>
> ---
> 
> Changes in v2:
>         - Use dev_printk for the dev variant (Chris Wilson)
> 
> Changes in v3:
> 	- Rename drm_log to drm_dev_printk (Chris Wilson)
> 	- Break out drm_printk from drm_dev_printk to reduce
> 	  image growth due to passing NULL around (Chris Wilson)
> 
>  drivers/gpu/drm/drm_drv.c |  25 ++++++---
>  include/drm/drmP.h        | 140 +++++++++++++++++++++++++++-------------------
>  2 files changed, 101 insertions(+), 64 deletions(-)
> 

[snip]

> +	dev_printk(level, dev, "[" DRM_NAME ":%s]%s %pV", function_name, prefix,
> +		   &vaf);

[...]

> +	printk("%s[" DRM_NAME ":%s]%s %pV", level, function_name, prefix, &vaf);

What do you think of #define'ing them to make sure these two format strings
don't end up diverging at some point?

Cheers,
  Eric



More information about the Linux-rockchip mailing list