aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
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 /include/drm/drmP.h
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 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 202424d17ed7..22db51d10619 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -126,6 +126,9 @@ extern void drm_ut_debug_printk(unsigned int request_level,
126 const char *prefix, 126 const char *prefix,
127 const char *function_name, 127 const char *function_name,
128 const char *format, ...); 128 const char *format, ...);
129extern __attribute__((format (printf, 2, 3)))
130int drm_err(const char *func, const char *format, ...);
131
129/***********************************************************************/ 132/***********************************************************************/
130/** \name DRM template customization defaults */ 133/** \name DRM template customization defaults */
131/*@{*/ 134/*@{*/
@@ -181,21 +184,11 @@ extern void drm_ut_debug_printk(unsigned int request_level,
181 * \param fmt printf() like format string. 184 * \param fmt printf() like format string.
182 * \param arg arguments 185 * \param arg arguments
183 */ 186 */
184#define DRM_ERROR(fmt, arg...) \ 187#define DRM_ERROR(fmt, ...) \
185 printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* " fmt , __func__ , ##arg) 188 drm_err(__func__, fmt, ##__VA_ARGS__)
186
187/**
188 * Memory error output.
189 *
190 * \param area memory area where the error occurred.
191 * \param fmt printf() like format string.
192 * \param arg arguments
193 */
194#define DRM_MEM_ERROR(area, fmt, arg...) \
195 printk(KERN_ERR "[" DRM_NAME ":%s:%s] *ERROR* " fmt , __func__, \
196 drm_mem_stats[area].name , ##arg)
197 189
198#define DRM_INFO(fmt, arg...) printk(KERN_INFO "[" DRM_NAME "] " fmt , ##arg) 190#define DRM_INFO(fmt, ...) \
191 printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
199 192
200/** 193/**
201 * Debug output. 194 * Debug output.