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

Lukas Wunner lukas at wunner.de
Fri Aug 12 19:26:32 UTC 2016


On Fri, Aug 12, 2016 at 07:39:38PM +0100, Chris Wilson wrote:
> On Fri, Aug 12, 2016 at 01:30:00PM -0400, Sean Paul wrote:
> > This patch consolidates all the various log functions/macros into
> > one uber function, drm_log. It also introduces some new DRM_DEV_*
> > variants that print the device name to 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)
> > 
> > 
> >  drivers/gpu/drm/drm_drv.c |  31 +++++------
> >  include/drm/drmP.h        | 133 ++++++++++++++++++++++++----------------------
> >  2 files changed, 82 insertions(+), 82 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> > index 57ce973..edd3291 100644
> > --- a/drivers/gpu/drm/drm_drv.c
> > +++ b/drivers/gpu/drm/drm_drv.c
> > @@ -63,37 +63,30 @@ static struct idr drm_minors_idr;
> >  
> >  static struct dentry *drm_debugfs_root;
> >  
> > -void drm_err(const char *format, ...)
> > +void drm_log(const struct device *dev, const char *level, unsigned int category,
> 
> I would have called this drm_printk() to match the function it wraps.

lxr.free-electrons.com says dev_info() is used in 2056 files whereas
dev_printk() is only used in 90 files. And dev_log() doesn't exist.
So drm_info() would arguably make the most sense.

Best regards,

Lukas


More information about the dri-devel mailing list