From: YOSHIFUJI Hideaki Date: Tue, 26 Apr 2011 10:23:24 +0000 (+0900) Subject: sctp: Allow regular C expression in 4th argument for SCTP_DEBUG_PRINTK_IPADDR macro. X-Git-Tag: next-20110726~165^2~450^2~80 X-Git-Url: https://git.kernelconcepts.de/?a=commitdiff_plain;h=3ced2dddf10f26f0aaff96f3345a3d876cea62f8;p=karo-tx-linux.git sctp: Allow regular C expression in 4th argument for SCTP_DEBUG_PRINTK_IPADDR macro. Signed-off-by: YOSHIFUJI Hideaki Acked-by: Wei Yongjun Signed-off-by: David S. Miller --- diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index b2c2366676a7..0037e28e80e5 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -285,20 +285,21 @@ do { \ pr_cont(fmt, ##args); \ } while (0) #define SCTP_DEBUG_PRINTK_IPADDR(fmt_lead, fmt_trail, \ - args_lead, saddr, args_trail...) \ + args_lead, addr, args_trail...) \ do { \ + const union sctp_addr *_addr = (addr); \ if (sctp_debug_flag) { \ - if (saddr->sa.sa_family == AF_INET6) { \ + if (_addr->sa.sa_family == AF_INET6) { \ printk(KERN_DEBUG \ pr_fmt(fmt_lead "%pI6" fmt_trail), \ args_lead, \ - &saddr->v6.sin6_addr, \ + &_addr->v6.sin6_addr, \ args_trail); \ } else { \ printk(KERN_DEBUG \ pr_fmt(fmt_lead "%pI4" fmt_trail), \ args_lead, \ - &saddr->v4.sin_addr.s_addr, \ + &_addr->v4.sin_addr.s_addr, \ args_trail); \ } \ } \