lkml.org 
[lkml]   [2018]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] wireless: mark expected switch fall-throughs
From
Date


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

\
 
 \ /
  Last update: 2018-10-23 02:32    [W:0.054 / U:1.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site