Messages in this thread | | | Date | Mon, 02 Dec 2013 08:45:47 +0800 | From | Chen Gang <> | 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
| |