From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 849F6C3279B for ; Fri, 6 Jul 2018 12:29:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C16321917 for ; Fri, 6 Jul 2018 12:29:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C16321917 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932893AbeGFM3c (ORCPT ); Fri, 6 Jul 2018 08:29:32 -0400 Received: from s3.sipsolutions.net ([144.76.63.242]:36002 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932569AbeGFM3a (ORCPT ); Fri, 6 Jul 2018 08:29:30 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.91) (envelope-from ) id 1fbPrZ-0000rZ-Lp; Fri, 06 Jul 2018 14:29:25 +0200 Message-ID: <1530880164.3197.38.camel@sipsolutions.net> Subject: Re: [PATCH] wireless: mark expected switch fall-throughs From: Johannes Berg To: "Gustavo A. R. Silva" , "David S. Miller" Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 06 Jul 2018 14:29:24 +0200 In-Reply-To: <20180704210553.GA7869@embeddedor.com> References: <20180704210553.GA7869@embeddedor.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 (3.26.6-1.fc27) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > 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:" johannes