[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <529BD83B.4030103@gmail.com>
Date: Mon, 02 Dec 2013 08:45:47 +0800
From: Chen Gang <gang.chen.5i5j@...il.com>
To: Joe Perches <joe@...ches.com>
CC: Johannes Berg <johannes@...solutions.net>,
"John W. Linville" <linville@...driver.com>,
rkuo <rkuo@...eaurora.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
David Miller <davem@...emloft.net>,
linux-wireless@...r.kernel.org, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must
be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case
On 12/02/2013 06:38 AM, Joe Perches wrote:
> On Sun, 2013-12-01 at 10:35 +0100, Johannes Berg wrote:
>> Good try, but no, now ap_sdata isn't even assigned. :)
>
> Right. Oh well. There's no improving this without
> significant rewrite. Even then, there may not be much
> overall improvement.
>
> btw: Chen, I think fall-throughs are fine as long as
> they are commented appropriately.
>
Hmm... for me, when use fall-through, need 2 things:
- need a comment.
- next case need not notice about prev case which fall-through.
If we can not fit the 2 things above, either can not use sub functions
or macros for it because of performance reason, 'goto' is better than
'fall-through'.
For me, in most cases, when a function becomes a long function, it is
always better to use sub-fuctions or macros instead of some blocks (but
it is really not urgent :-) ).
Thanks.
--
Chen Gang
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists