linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: Michael Buesch <mb@bu3sch.de>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
	linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>,
	Michael Wu <flamingice@sourmilk.net>
Subject: Re: [PATCH 3/3] mac80211: debugfs support for TSM and DLS
Date: Mon, 28 May 2007 09:43:16 +0800	[thread overview]
Message-ID: <20070528014316.GA416@mail.intel.com> (raw)
In-Reply-To: <200705251826.04821.mb@bu3sch.de>

On Fri, May 25, 2007 at 06:26:04PM +0200, Michael Buesch wrote:
> On Friday 25 May 2007 18:20:08 Randy Dunlap wrote:
> > On Fri, 25 May 2007 19:52:44 +0800 Zhu Yi wrote:
> > 
> > >  net/mac80211/debugfs_netdev.c |  332 +++++++++++++++++++++++++++++++++++++++++
> > >  net/mac80211/ieee80211_i.h    |   33 ++++
> > >  2 files changed, 365 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
> > > index 9e39646..e0f77f9 100644
> > > --- a/net/mac80211/debugfs_netdev.c
> > > +++ b/net/mac80211/debugfs_netdev.c
> > 
> > > +#define DEBUGFS_QOS_DEL(name)						\
> > > +	debugfs_remove(sdata->debugfs.sta.qos.name);			\
> > > +	sdata->debugfs.sta.qos.name = NULL;
> > 
> > Enclose multi-line macros inside braces, or even better, inside
> > 
> > 	do {
> > 		/* multi-lines */
> > 	} while (0);
> 
> Remove the semicolon.

I'd agree. But the existed DEBUGFS_DEL one also needs to be changed.
Here is the patch against the "[PATCH 3/3] mac80211: debugfs support
for TSM and DLS"

Thanks,
-yi


>From 7886ec6ddcc25af5ba3d0284ea3ac7c99bb99da0 Mon Sep 17 00:00:00 2001
From: Zhu Yi <yi.zhu@intel.com>
Date: Mon, 28 May 2007 09:41:19 +0800
Subject: [PATCH 4/4] mac80211: use do { } while (0) for multi-line macros

Use do { } while (0) for multi-line macros

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 net/mac80211/debugfs_netdev.c |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index e0f77f9..b9409ee 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -119,8 +119,10 @@ static const struct file_operations qos_ ##name## _ops = {		\
 		sdata, &qos_ ##name## _ops);
 
 #define DEBUGFS_QOS_DEL(name)						\
-	debugfs_remove(sdata->debugfs.sta.qos.name);			\
-	sdata->debugfs.sta.qos.name = NULL;
+	do {								\
+		debugfs_remove(sdata->debugfs.sta.qos.name);		\
+		sdata->debugfs.sta.qos.name = NULL;			\
+	} while (0)
 
 DEBUGFS_QOS_FILE(addts_11e, ieee80211_send_addts);
 DEBUGFS_QOS_FILE(addts_wmm, wmm_send_addts);
@@ -281,8 +283,10 @@ static const struct file_operations tsinfo_ ##_name## _ops = {		\
 				    sdata, &tsinfo_UP_ops);
 
 #define DEBUGFS_TSINFO_DEL(name)					\
-	debugfs_remove(sdata->debugfs.sta.tsinfo.name);			\
-	sdata->debugfs.sta.tsinfo.name = NULL;
+	do {								\
+		debugfs_remove(sdata->debugfs.sta.tsinfo.name);		\
+		sdata->debugfs.sta.tsinfo.name = NULL;			\
+	} while (0)
 
 DEBUGFS_TSINFO_FILE(TSID, 8, 15);
 DEBUGFS_TSINFO_FILE(DIR, 0, 3);
@@ -325,8 +329,10 @@ static const struct file_operations tspec_ ##name## _ops = {		\
 		0444, tspecd, sdata, &tspec_ ##name## _ops);
 
 #define DEBUGFS_TSPEC_DEL(name)						\
-	debugfs_remove(sdata->debugfs.sta.tspec.name);			\
-	sdata->debugfs.sta.tspec.name = NULL;
+	do {								\
+		debugfs_remove(sdata->debugfs.sta.tspec.name);		\
+		sdata->debugfs.sta.tspec.name = NULL;			\
+	} while (0)
 
 DEBUGFS_TSPEC_FILE(nominal_msdu_size);
 DEBUGFS_TSPEC_FILE(max_msdu_size);
@@ -569,9 +575,11 @@ static void add_files(struct ieee80211_sub_if_data *sdata)
 	}
 }
 
-#define DEBUGFS_DEL(name, type)\
-	debugfs_remove(sdata->debugfs.type.name);\
-	sdata->debugfs.type.name = NULL;
+#define DEBUGFS_DEL(name, type)					\
+	do {							\
+		debugfs_remove(sdata->debugfs.type.name);	\
+		sdata->debugfs.type.name = NULL;		\
+	} while (0)
 
 static void del_sta_files(struct ieee80211_sub_if_data *sdata)
 {
-- 
1.5.0.rc2.g73a2

  reply	other threads:[~2007-05-28  1:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-25 11:52 [PATCH 3/3] mac80211: debugfs support for TSM and DLS Zhu Yi
2007-05-25 16:20 ` Randy Dunlap
2007-05-25 16:26   ` Michael Buesch
2007-05-28  1:43     ` Zhu Yi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-06-06  8:22 Zhu Yi
2007-06-07 20:39 ` Jiri Benc
2007-06-08  1:17   ` Zhu Yi
2007-06-08  9:59     ` Jiri Benc
2007-05-14  5:15 Zhu Yi
2007-05-24  7:12 ` Michael Wu
2007-05-24  7:51   ` Zhu Yi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070528014316.GA416@mail.intel.com \
    --to=yi.zhu@intel.com \
    --cc=flamingice@sourmilk.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mb@bu3sch.de \
    --cc=randy.dunlap@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).