[PATCH 1/2] drm: Introduce DRM_DEV_* log messages
seanpaul at chromium.org
Fri Aug 12 10:23:15 PDT 2016
On Fri, Aug 12, 2016 at 1:13 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> 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).
Yep, that makes sense, v2 incoming.
> Chris Wilson, Intel Open Source Technology Centre
More information about the Linux-rockchip