Thread (13 messages) 13 messages, 5 authors, 2016-08-18

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

From: Chris Wilson <hidden>
Date: 2016-08-12 19:45:23
Also in: dri-devel

Possibly related (same subject, not in this thread)

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:
quoted
On Fri, Aug 12, 2016 at 01:30:00PM -0400, Sean Paul wrote:
quoted
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 <redacted>
---

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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help