1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _MPX_DEBUG_H 3 #define _MPX_DEBUG_H 4 5 #ifndef DEBUG_LEVEL 6 #define DEBUG_LEVEL 0 7 #endif 8 #define dprintf_level(level, args...) do { if(level <= DEBUG_LEVEL) printf(args); } while(0) 9 #define dprintf1(args...) dprintf_level(1, args) 10 #define dprintf2(args...) dprintf_level(2, args) 11 #define dprintf3(args...) dprintf_level(3, args) 12 #define dprintf4(args...) dprintf_level(4, args) 13 #define dprintf5(args...) dprintf_level(5, args) 14 15 #endif /* _MPX_DEBUG_H */ 16