aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-04-17 23:35:51 -0400
committerDave Airlie <airlied@redhat.com>2011-04-28 00:53:02 -0400
commit5ad3d8831f0c97257460c11ddcc1cc0466c762d4 (patch)
tree8ab86a7b1c0ebfcfdbf24270ac1f54ed1bed8a6e /drivers/gpu
parentcb49ba0bb18632faa7c5ce1dcb095eaa70821c1d (diff)
drm: Create and use drm_err
Reduce drm text size ~1% by using drm_err and printf extension %pV to emit error messages. Remove unused macro DRM_MEM_ERROR. $ size drivers/gpu/drm/built-in.o* text data bss dec hex filename 361159 9663 256 371078 5a986 drivers/gpu/drm/built-in.o.new 365416 9663 256 375335 5ba27 drivers/gpu/drm/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_stub.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 001273d57f2..6d7b083c5b7 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -62,6 +62,26 @@ struct idr drm_minors_idr;
62struct class *drm_class; 62struct class *drm_class;
63struct proc_dir_entry *drm_proc_root; 63struct proc_dir_entry *drm_proc_root;
64struct dentry *drm_debugfs_root; 64struct dentry *drm_debugfs_root;
65
66int drm_err(const char *func, const char *format, ...)
67{
68 struct va_format vaf;
69 va_list args;
70 int r;
71
72 va_start(args, format);
73
74 vaf.fmt = format;
75 vaf.va = &args;
76
77 r = printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* %pV", func, &vaf);
78
79 va_end(args);
80
81 return r;
82}
83EXPORT_SYMBOL(drm_err);
84
65void drm_ut_debug_printk(unsigned int request_level, 85void drm_ut_debug_printk(unsigned int request_level,
66 const char *prefix, 86 const char *prefix,
67 const char *function_name, 87 const char *function_name,
@@ -78,6 +98,7 @@ void drm_ut_debug_printk(unsigned int request_level,
78 } 98 }
79} 99}
80EXPORT_SYMBOL(drm_ut_debug_printk); 100EXPORT_SYMBOL(drm_ut_debug_printk);
101
81static int drm_minor_get_id(struct drm_device *dev, int type) 102static int drm_minor_get_id(struct drm_device *dev, int type)
82{ 103{
83 int new_id; 104 int new_id;