From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Gustavo A. R. Silva" Subject: Re: [PATCH] wireless: mark expected switch fall-throughs Date: Tue, 23 Oct 2018 02:07:12 +0200 Message-ID: <3d764be1-cf8e-b1f0-1f4d-765ca3435174@embeddedor.com> References: <20180704210553.GA7869@embeddedor.com> <1530880164.3197.38.camel@sipsolutions.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Johannes Berg , "David S. Miller" Return-path: In-Reply-To: <1530880164.3197.38.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> Content-Language: en-GB Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On 7/6/18 2:29 PM, Johannes Berg wrote: > Hi Gustavo, > >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. > > You dropped the remark saying you didn't review them, but did you? > I'll add it in v2. >> case NL80211_CHAN_WIDTH_20: >> if (!ht_cap->ht_supported) >> return false; >> + /* else: fall through */ > > What's the point in else:? > > We also don't necessarily write > > if (!...) > return false; > else > do_something(); > > but rather > > if (!...) > return false; > do_something(). > > I think I'd prefer without the "else:" > Sure thing. I'll change this in v2. I'll send v2 shortly. Thanks for the feedback. -- Gustavo