mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
This commit is contained in:
parent
cb49ba0bb1
commit
5ad3d8831f
2 changed files with 28 additions and 14 deletions
|
|
@ -126,6 +126,9 @@ extern void drm_ut_debug_printk(unsigned int request_level,
|
|||
const char *prefix,
|
||||
const char *function_name,
|
||||
const char *format, ...);
|
||||
extern __attribute__((format (printf, 2, 3)))
|
||||
int drm_err(const char *func, const char *format, ...);
|
||||
|
||||
/***********************************************************************/
|
||||
/** \name DRM template customization defaults */
|
||||
/*@{*/
|
||||
|
|
@ -181,21 +184,11 @@ extern void drm_ut_debug_printk(unsigned int request_level,
|
|||
* \param fmt printf() like format string.
|
||||
* \param arg arguments
|
||||
*/
|
||||
#define DRM_ERROR(fmt, arg...) \
|
||||
printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* " fmt , __func__ , ##arg)
|
||||
#define DRM_ERROR(fmt, ...) \
|
||||
drm_err(__func__, fmt, ##__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* Memory error output.
|
||||
*
|
||||
* \param area memory area where the error occurred.
|
||||
* \param fmt printf() like format string.
|
||||
* \param arg arguments
|
||||
*/
|
||||
#define DRM_MEM_ERROR(area, fmt, arg...) \
|
||||
printk(KERN_ERR "[" DRM_NAME ":%s:%s] *ERROR* " fmt , __func__, \
|
||||
drm_mem_stats[area].name , ##arg)
|
||||
|
||||
#define DRM_INFO(fmt, arg...) printk(KERN_INFO "[" DRM_NAME "] " fmt , ##arg)
|
||||
#define DRM_INFO(fmt, ...) \
|
||||
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* Debug output.
|
||||
|
|
|
|||
Loading…
Reference in a new issue