1 /* SPDX-License-Identifier: GPL-2.0-only */
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_
18 extern int mfc_debug_level
;
20 #define mfc_debug(level, fmt, args...) \
22 if (mfc_debug_level >= level) \
23 printk(KERN_DEBUG "%s:%d: " fmt, \
24 __func__, __LINE__, ##args); \
27 #define mfc_debug(level, fmt, args...)
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...) \
35 printk(KERN_ERR "%s:%d: " fmt, \
36 __func__, __LINE__, ##args); \
39 #define mfc_err_limited(fmt, args...) \
41 printk_ratelimited(KERN_ERR "%s:%d: " fmt, \
42 __func__, __LINE__, ##args); \
45 #define mfc_info(fmt, args...) \
47 printk(KERN_INFO "%s:%d: " fmt, \
48 __func__, __LINE__, ##args); \
51 #endif /* S5P_MFC_DEBUG_H_ */