Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1596978pxb; Fri, 20 Nov 2020 13:41:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEawesS/5MO4Xm8K9FqAfecsjN/aPY1Q19rgyNxUPFC/24nUOwq+qnb++yqzHMubRSPHUG X-Received: by 2002:a17:906:c41:: with SMTP id t1mr34670537ejf.19.1605908488242; Fri, 20 Nov 2020 13:41:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605908488; cv=none; d=google.com; s=arc-20160816; b=FsbbZtUYRFK1M/0xuuUweFd7mptz6lH8EL+Q3hx8x8IfFAHrbxJGUZ/vKrMyc0GLTn otNlOK0cUdJCfU9y8L/DnGEKE6Rr88MtMDUrBgqhyHsIgJzw3ObT1tfW2kewcO32HY12 U4nyixyCIdBxUVQMs5rqiq3n7j6v0RMANQXyTqHaQyu6dyfis1D+W3Ue1yebdl3753+d xg7nOwUN+ahDCnCh+NDc48MGHoWbyqwdsDpj5RGKnf81mGOSd1qFdkdiaEoCmc5UYOfH zfIWJR47EXcTuOW/7fysu3zvIfRP9XGBx2OptFl5PZ9d2C5V2iVafxlRppivv+rKInQ2 bc8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:subject:from:dkim-signature; bh=s1WYbCf4DLtQCOZZjao8Kq3OsBZTVKuAEA5HpJECn0U=; b=Dz8vStbo1ED44rKL3YoxrKZdKHJzATHZSGPboLizgWOL86QR9GZyR1EWSznJSWR2uW eTTSG6u0ctgPt1sHF00ssW+HwLLdkUDjiUr0kpd5isVvjmC4OJTpC6oSJZWDx98sZp/u ueZkx4eM6D+dLzurDVZXhvdz2yRZ+BjpFZcsqRNVo0LtPQfp4z7C1pY5+UtDmFzsei3p 5kZRZyqPOGLDuTdkOAgsYK9Bc4+h9aS6LPdZpmAjkupfa2C9S8hBPPdSvhPmQs3Ql4Gw jaOxASctW9wy5mvB17GgMsm/AiAFClcSs2fbQVUNGKqz/6NHNZKIbLck+YB6Kf54vriK Vofw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Lo6qc0IB; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si1368096ejy.547.2020.11.20.13.41.04; Fri, 20 Nov 2020 13:41:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Lo6qc0IB; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728330AbgKTVjq (ORCPT + 99 others); Fri, 20 Nov 2020 16:39:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727993AbgKTVjp (ORCPT ); Fri, 20 Nov 2020 16:39:45 -0500 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56BA8C0613CF; Fri, 20 Nov 2020 13:39:45 -0800 (PST) Received: by mail-qt1-x843.google.com with SMTP id g17so8259242qts.5; Fri, 20 Nov 2020 13:39:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=s1WYbCf4DLtQCOZZjao8Kq3OsBZTVKuAEA5HpJECn0U=; b=Lo6qc0IBxen4XlAgIpJdR6sjJ1pLYCV3g7ArGA/SM2jyVR8pYG/MWvFdccJhivY0wa vW0MOv1VTxK/YFH/8Yf4mRzNdpA0I1G0zr2BJ7FbDoD8SFUQKU09T8ebe/DsA5nNI60I /pGFVG3h4sI1bpOsaCnY9+OiKvEv/rh5hcI5yuwOg/QDKontUYQa6Z8gV6sVlDRQhcrT 5ENhtCCLnzijiNk2a5Ql62wErNiDYBtsoChGBfS6f9ABR0uBrDUGK+yEHFgD47MDAvIe 6r3nmbz+miE4Upg2IlE9Zr21xWIitL0eHpXPNyv52fo06GFTCl4oHFk8nwu/fARsAqgh pP3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=s1WYbCf4DLtQCOZZjao8Kq3OsBZTVKuAEA5HpJECn0U=; b=Ourl23PM+zpVFITEndx3hWyX0M0ENQOCRYPuaIdlTw23DYhUxlDFr7oN8qVz4lWRsH Aw5yiUym3Mm5WYrYSmLGI7H+Job5h0oUB1IE9aC/trKorkjqK0EYo/bWqLxJenSYL1Yk xdm2c9ugNWiJ7YzVneIeLElApncyv3/hkw/BXWotU2e9loGrTgZaTBMvxUFcpmzBEzVX 40gtXm7f2sE17sml9GydLsWGubh8qfAzAUwDp1KDOY/7ZIwbPb0XVX/O495mhhXgNVt+ XqpsclpsvKLVuJS1xxatm6yGTrqTi5b3QNTudHvuwLrjMkHwvu6BbFeh3Ij84UqN1u+f 8zDw== X-Gm-Message-State: AOAM530zoY/JwnQGql6unyrU/IVuOvO0I+Nz/2SlG1MtbT/i+PbviNrO /dc4WjB7PY1Bprfb8XEyIaurMsniGks= X-Received: by 2002:ac8:5848:: with SMTP id h8mr13137812qth.232.1605908384275; Fri, 20 Nov 2020 13:39:44 -0800 (PST) Received: from ?IPv6:2620:10d:c0a8:1102::1844? ([2620:10d:c091:480::1:6eec]) by smtp.gmail.com with ESMTPSA id s7sm2823401qkm.124.2020.11.20.13.39.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Nov 2020 13:39:43 -0800 (PST) From: Jes Sorensen X-Google-Original-From: Jes Sorensen Subject: Re: [PATCH 117/141] rtl8xxxu: Fix fall-through warnings for Clang To: "Gustavo A. R. Silva" , Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: Message-ID: <691515e4-4d40-56cf-5f7a-1819aad1afa9@gmail.com> Date: Fri, 20 Nov 2020 16:39:42 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 11/20/20 1:38 PM, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix > multiple warnings by replacing /* fall through */ comments with > the new pseudo-keyword macro fallthrough; instead of letting the > code fall through to the next case. > > Notice that Clang doesn't recognize /* fall through */ comments as > implicit fall-through markings. > > Link: https://github.com/KSPP/linux/issues/115 > Signed-off-by: Gustavo A. R. Silva > --- > drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) While I wasn't CC'ed on the cover-letter I see Jakub also raised issues about this unnecessary patch noise. Quite frankly, this seems to be patch churn for the sake of patch churn. If clang is broken, fix clang instead. NACK Jes > diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > index 5cd7ef3625c5..afc97958fa4d 100644 > --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > @@ -1145,7 +1145,7 @@ void rtl8xxxu_gen1_config_channel(struct ieee80211_hw *hw) > switch (hw->conf.chandef.width) { > case NL80211_CHAN_WIDTH_20_NOHT: > ht = false; > - /* fall through */ > + fallthrough; > case NL80211_CHAN_WIDTH_20: > opmode |= BW_OPMODE_20MHZ; > rtl8xxxu_write8(priv, REG_BW_OPMODE, opmode); > @@ -1272,7 +1272,7 @@ void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw) > switch (hw->conf.chandef.width) { > case NL80211_CHAN_WIDTH_20_NOHT: > ht = false; > - /* fall through */ > + fallthrough; > case NL80211_CHAN_WIDTH_20: > rf_mode_bw |= WMAC_TRXPTCL_CTL_BW_20; > subchannel = 0; > @@ -1741,11 +1741,11 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv) > case 3: > priv->ep_tx_low_queue = 1; > priv->ep_tx_count++; > - /* fall through */ > + fallthrough; > case 2: > priv->ep_tx_normal_queue = 1; > priv->ep_tx_count++; > - /* fall through */ > + fallthrough; > case 1: > priv->ep_tx_high_queue = 1; > priv->ep_tx_count++; >