[PATCH v2 1/2] drm: Introduce DRM_DEV_* log messages
Lukas Wunner
lukas at wunner.de
Fri Aug 12 12:50:35 PDT 2016
On Fri, Aug 12, 2016 at 08:44:38PM +0100, Chris Wilson wrote:
> 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 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.
>
> dev_printk is the underlying mechanism, dev_log() is a curry function
> calling dev_printk with some parameters already provided.
Ugh, sorry, I misread the code. You're right, drm_printk() would seem
more logical.
Thanks,
Lukas
More information about the Linux-rockchip
mailing list