Thread (3 messages) read the whole thread 3 messages, 2 authors, 2016-08-12

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

From: Chris Wilson <hidden>
Date: 2016-08-12 17:13:44
Also in: dri-devel

Possibly related (same subject, not in this thread)

On Fri, Aug 12, 2016 at 01:00:53PM -0400, Sean Paul wrote:
This patch consolodates 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.
+void drm_log(const struct device *dev, const char *level, unsigned int category,
+	     const char *function_name, const char *prefix,
+	     const char *format, ...)
 {
+	if (dev)
+		printk("%s%s [" DRM_NAME ":%s]%s %pV", level,
+		       dev_name(dev), function_name, prefix, &vaf);
+	else
+		printk("%s[" DRM_NAME ":%s]%s %pV", level, function_name,
+		       prefix, &vaf);
My hope was that we would migrate towards dev_printk so that our log
messages would have better conformity, especially between our messages
and those printed by subsystems on our behalf (using our struct device).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help