From patchwork Wed Apr 27 08:28:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michio Honda X-Patchwork-Id: 92998 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id DFB5CB6EEE for ; Wed, 27 Apr 2011 18:29:00 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754790Ab1D0I2z (ORCPT ); Wed, 27 Apr 2011 04:28:55 -0400 Received: from shonan.sfc.wide.ad.jp ([203.178.142.130]:40077 "EHLO mail.sfc.wide.ad.jp" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754716Ab1D0I2y convert rfc822-to-8bit (ORCPT ); Wed, 27 Apr 2011 04:28:54 -0400 Received: from dhcp239.ht.sfc.keio.ac.jp (dhcp239.ht.sfc.keio.ac.jp [133.27.171.239]) by mail.sfc.wide.ad.jp (Postfix) with ESMTPSA id 99B00278083; Wed, 27 Apr 2011 17:28:53 +0900 (JST) From: Michio Honda Subject: [PATCH 2/6] sctp: Allow regular C expression in 4th argument for SCTP_DEBUG_PRINTK_IPADDR macro. Date: Wed, 27 Apr 2011 17:28:53 +0900 Message-Id: Cc: Honda Michio , YOSHIFUJI Hideaki , Wei Yongjun To: netdev@vger.kernel.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From e535067d5c26223c7230232ee8e228370db113a6 Mon Sep 17 00:00:00 2001 From: YOSHIFUJI Hideaki Date: Tue, 26 Apr 2011 19:23:24 +0900 Subject: [PATCH 2/6] sctp: Allow regular C expression in 4th argument for SCTP_DEBUG_PRINTK_IPADDR macro. Signed-off-by: YOSHIFUJI Hideaki --- include/net/sctp/sctp.h | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 7e8e34c..e606f04 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -286,20 +286,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); \ } \ } \