1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef S5P_MFC_DEBUG_H_
16#define S5P_MFC_DEBUG_H_
17
18#define DEBUG
19
20#ifdef DEBUG
21extern int mfc_debug_level;
22
23#define mfc_debug(level, fmt, args...) \
24 do { \
25 if (mfc_debug_level >= level) \
26 printk(KERN_DEBUG "%s:%d: " fmt, \
27 __func__, __LINE__, ##args); \
28 } while (0)
29#else
30#define mfc_debug(level, fmt, args...)
31#endif
32
33#define mfc_debug_enter() mfc_debug(5, "enter\n")
34#define mfc_debug_leave() mfc_debug(5, "leave\n")
35
36#define mfc_err(fmt, args...) \
37 do { \
38 printk(KERN_ERR "%s:%d: " fmt, \
39 __func__, __LINE__, ##args); \
40 } while (0)
41
42#define mfc_err_limited(fmt, args...) \
43 do { \
44 printk_ratelimited(KERN_ERR "%s:%d: " fmt, \
45 __func__, __LINE__, ##args); \
46 } while (0)
47
48#define mfc_info(fmt, args...) \
49 do { \
50 printk(KERN_INFO "%s:%d: " fmt, \
51 __func__, __LINE__, ##args); \
52 } while (0)
53
54#endif
55