@@ -399,7 +399,8 @@ extern int kptr_restrict;
399399
400400
401401/* If you are writing a driver, please use dev_dbg instead */
402- #if defined(CONFIG_DYNAMIC_DEBUG )
402+ #if defined(CONFIG_DYNAMIC_DEBUG ) || \
403+ (defined(CONFIG_DYNAMIC_DEBUG_CORE ) && defined(DYNAMIC_DEBUG_MODULE ))
403404#include <linux/dynamic_debug.h>
404405
405406/**
@@ -535,7 +536,8 @@ extern int kptr_restrict;
535536#endif
536537
537538/* If you are writing a driver, please use dev_dbg instead */
538- #if defined(CONFIG_DYNAMIC_DEBUG )
539+ #if defined(CONFIG_DYNAMIC_DEBUG ) || \
540+ (defined(CONFIG_DYNAMIC_DEBUG_CORE ) && defined(DYNAMIC_DEBUG_MODULE ))
539541/* descriptor check is first to prevent flooding with "callbacks suppressed" */
540542#define pr_debug_ratelimited (fmt , ...) \
541543do { \
@@ -582,7 +584,8 @@ static inline void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
582584
583585#endif
584586
585- #if defined(CONFIG_DYNAMIC_DEBUG )
587+ #if defined(CONFIG_DYNAMIC_DEBUG ) || \
588+ (defined(CONFIG_DYNAMIC_DEBUG_CORE ) && defined(DYNAMIC_DEBUG_MODULE ))
586589#define print_hex_dump_debug (prefix_str , prefix_type , rowsize , \
587590 groupsize , buf , len , ascii ) \
588591 dynamic_hex_dump(prefix_str, prefix_type, rowsize, \
0 commit comments