Change SCTP_DEBUG_PRINTK and SCTP_DEBUG_PRINTK_IPADDR to
use do { print } while (0) guards.
Add SCTP_DEBUG_PRINTK_CONT to fix errors in log when
lines were continued.
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Add a missing newline in "Failed bind hash alloc"
Signed-off-by: Joe Perches <joe@perches.com>
---
include/net/sctp/sctp.h | 48 ++++++++++++++++++++++++++++-----------------
net/sctp/associola.c | 2 +
net/sctp/chunk.c | 2 +
net/sctp/inqueue.c | 2 +
net/sctp/ipv6.c | 4 ++-
net/sctp/objcnt.c | 5 ++-
net/sctp/output.c | 2 +
net/sctp/outqueue.c | 34 +++++++++++++++++---------------
net/sctp/probe.c | 4 ++-
net/sctp/protocol.c | 17 +++++++--------
net/sctp/sm_make_chunk.c | 2 +
net/sctp/sm_sideeffect.c | 21 +++++++++----------
net/sctp/sm_statefuns.c | 20 +++++++++---------
net/sctp/sm_statetable.c | 42 ++++++++++++++++++++--------------------
net/sctp/socket.c | 39 ++++++++++++++-----------------------
net/sctp/transport.c | 9 ++++---
16 files changed, 136 insertions(+), 117 deletions(-)
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 65946bc..2cb3980 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -275,24 +275,35 @@ struct sctp_mib {
/* Print debugging messages. */
#if SCTP_DEBUG
extern int sctp_debug_flag;
-#define SCTP_DEBUG_PRINTK(whatever...) \
- ((void) (sctp_debug_flag && printk(KERN_DEBUG whatever)))
-#define SCTP_DEBUG_PRINTK_IPADDR(lead, trail, leadparm, saddr, otherparms...) \
- if (sctp_debug_flag) { \
- if (saddr->sa.sa_family == AF_INET6) { \
- printk(KERN_DEBUG \
- lead "%pI6" trail, \
- leadparm, \
- &saddr->v6.sin6_addr, \
- otherparms); \
- } else { \
- printk(KERN_DEBUG \
- lead "%pI4" trail, \
- leadparm, \
- &saddr->v4.sin_addr.s_addr, \
- otherparms); \
- } \
- }
+#define ...