[PATCH 1/2] drm: Create and use drm_err

Joe Perches joe at perches.com
Mon Apr 18 16:05:39 PDT 2011

On Mon, 2011-04-18 at 15:56 -0700, Ian Romanick wrote:
> I believe that DRM_NAME is a define, and drm_stub.c is in common code.
> As a result, won't this change cause something different to get logged?

Nope.  DRM_NAME is #defined only once.

include/drm/drm.h:#define DRM_NAME	"drm"	

The only real reason to do this is the "*ERROR*"
used in:

> > -#define DRM_ERROR(fmt, arg...) \
> > -	printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* " fmt , __func__ , ##arg)

It'd be more or less similar to use:

#define DRM_ERROR(fmt, ...)	\
	pr_err("%s: " fmt, __func__, ##__VA_ARGS__)

or just convert DRM_ERROR to pr_err and DRM_INFO to pr_info.

More information about the dri-devel mailing list