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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 12, 2016 at 09:26:32PM +0200, Lukas Wunner wrote:
> 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@xxxxxxxxxxxx>
> > > ---
> > > 
> > > 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.

dev_printk is the underlying mechanism, dev_log() is a curry function
calling dev_printk with some parameters already provided.

Speaking of which, if we did separate drm_printk() and drm_dev_printk(),
if drm_printk just called drm_dev_printk(NULL, ...) we would barely grow
the build.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux