Merge tag 'regmap-fix-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux/fpc-iii.git] / drivers / media / platform / s5p-mfc / s5p_mfc_debug.h
blob752bbe4fe48e289c5e00043fb724c64ad6079799
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * drivers/media/platform/s5p-mfc/s5p_mfc_debug.h
5 * Header file for Samsung MFC (Multi Function Codec - FIMV) driver
6 * This file contains debug macros
8 * Kamil Debski, Copyright (c) 2011 Samsung Electronics
9 * http://www.samsung.com/
12 #ifndef S5P_MFC_DEBUG_H_
13 #define S5P_MFC_DEBUG_H_
15 #define DEBUG
17 #ifdef DEBUG
18 extern int mfc_debug_level;
20 #define mfc_debug(level, fmt, args...) \
21 do { \
22 if (mfc_debug_level >= level) \
23 printk(KERN_DEBUG "%s:%d: " fmt, \
24 __func__, __LINE__, ##args); \
25 } while (0)
26 #else
27 #define mfc_debug(level, fmt, args...)
28 #endif
30 #define mfc_debug_enter() mfc_debug(5, "enter\n")
31 #define mfc_debug_leave() mfc_debug(5, "leave\n")
33 #define mfc_err(fmt, args...) \
34 do { \
35 printk(KERN_ERR "%s:%d: " fmt, \
36 __func__, __LINE__, ##args); \
37 } while (0)
39 #define mfc_err_limited(fmt, args...) \
40 do { \
41 printk_ratelimited(KERN_ERR "%s:%d: " fmt, \
42 __func__, __LINE__, ##args); \
43 } while (0)
45 #define mfc_info(fmt, args...) \
46 do { \
47 printk(KERN_INFO "%s:%d: " fmt, \
48 __func__, __LINE__, ##args); \
49 } while (0)
51 #endif /* S5P_MFC_DEBUG_H_ */