Skip to content

Commit

Permalink
rds: debug messages are enabled by default
Browse files Browse the repository at this point in the history
rds use Kconfig option called "RDS_DEBUG" to enable rds debug messages.
This option cause the rds Makefile to add -DDEBUG to the rds gcc command
line.

When CONFIG_DYNAMIC_DEBUG is enabled, the "DEBUG" macro is used by
include/linux/dynamic_debug.h to decide if dynamic debug prints should
be sent by default to the kernel log.

rds should not enable this macro for production builds. rds dynamic
debug work as expected follow this fix.

Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Reviewed-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
shamir rabinovitch authored and David S. Miller committed Oct 29, 2016
1 parent 880b583 commit ff57087
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/rds/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ obj-$(CONFIG_RDS_TCP) += rds_tcp.o
rds_tcp-y := tcp.o tcp_connect.o tcp_listen.o tcp_recv.o \
tcp_send.o tcp_stats.o

ccflags-$(CONFIG_RDS_DEBUG) := -DDEBUG
ccflags-$(CONFIG_RDS_DEBUG) := -DRDS_DEBUG

2 changes: 1 addition & 1 deletion net/rds/rds.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define KERNEL_HAS_ATOMIC64
#endif

#ifdef DEBUG
#ifdef RDS_DEBUG
#define rdsdebug(fmt, args...) pr_debug("%s(): " fmt, __func__ , ##args)
#else
/* sigh, pr_debug() causes unused variable warnings */
Expand Down

0 comments on commit ff57087

Please sign in to comment.