From patchwork Tue Sep 1 17:36:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 259396 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=-11.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable 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 F2939C43461 for ; Tue, 1 Sep 2020 17:30:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D19DB20866 for ; Tue, 1 Sep 2020 17:30:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598981400; bh=+s+pCurhvidYuSPa5gLrpalcWwRdWwzFktQe+NIAdVs=; h=Date:From:To:Cc:Subject:List-ID:From; b=niwfXiK1zsPlCXhreAKjYJFqK9jAxEGddtRxSI8QDWLVeoRKbJDHtZpnePGyem3tP EKRnHay+rmDRCYOpPjyU7/ErAB5Nc/fgX6ToY455m1M4STmkdAkwzeFiyFmOvwIkr6 Q/EBoZpEPZme3k6tm4K8jZIPyczh54FADXzEge6I= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731456AbgIAR3z (ORCPT ); Tue, 1 Sep 2020 13:29:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:39370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbgIAR3y (ORCPT ); Tue, 1 Sep 2020 13:29:54 -0400 Received: from embeddedor (187-162-31-110.static.axtel.net [187.162.31.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 91EE920866; Tue, 1 Sep 2020 17:29:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598981393; bh=+s+pCurhvidYuSPa5gLrpalcWwRdWwzFktQe+NIAdVs=; h=Date:From:To:Cc:Subject:From; b=pLFRoNLzcPgdZE4K1Nv9wRlDf1cGZh5X+Ixcih4U6XT2LYU/mxHz6sPJBunBRLh6c H9RVhxy6iW5YGyllgPQj3i0+qaNUS0qvzqyX6Wpt9cBjOawsurfGKA9UtGtrBvnSIw CA18o22vkpuDCKAO1pIQI7T3HOgOovl2kYaQnJmE= Date: Tue, 1 Sep 2020 12:36:03 -0500 From: "Gustavo A. R. Silva" To: Jakub Kicinski , Kalle Valo , "David S. Miller" , Matthias Brugger Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH][next] mt7601u: Use fallthrough pseudo-keyword Message-ID: <20200901173603.GA2701@embeddedor> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/net/wireless/mediatek/mt7601u/dma.c | 4 ++-- drivers/net/wireless/mediatek/mt7601u/mac.c | 4 ++-- drivers/net/wireless/mediatek/mt7601u/phy.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt7601u/dma.c b/drivers/net/wireless/mediatek/mt7601u/dma.c index f6a0454abe04..09f931d4598c 100644 --- a/drivers/net/wireless/mediatek/mt7601u/dma.c +++ b/drivers/net/wireless/mediatek/mt7601u/dma.c @@ -196,7 +196,7 @@ static void mt7601u_complete_rx(struct urb *urb) default: dev_err_ratelimited(dev->dev, "rx urb failed: %d\n", urb->status); - /* fall through */ + fallthrough; case 0: break; } @@ -241,7 +241,7 @@ static void mt7601u_complete_tx(struct urb *urb) default: dev_err_ratelimited(dev->dev, "tx urb failed: %d\n", urb->status); - /* fall through */ + fallthrough; case 0: break; } diff --git a/drivers/net/wireless/mediatek/mt7601u/mac.c b/drivers/net/wireless/mediatek/mt7601u/mac.c index cad5e81fcf77..d2ee1aaa3c81 100644 --- a/drivers/net/wireless/mediatek/mt7601u/mac.c +++ b/drivers/net/wireless/mediatek/mt7601u/mac.c @@ -45,7 +45,7 @@ mt76_mac_process_tx_rate(struct ieee80211_tx_rate *txrate, u16 rate) return; case MT_PHY_TYPE_HT_GF: txrate->flags |= IEEE80211_TX_RC_GREEN_FIELD; - /* fall through */ + fallthrough; case MT_PHY_TYPE_HT: txrate->flags |= IEEE80211_TX_RC_MCS; txrate->idx = idx; @@ -419,7 +419,7 @@ mt76_mac_process_rate(struct ieee80211_rx_status *status, u16 rate) return; case MT_PHY_TYPE_HT_GF: status->enc_flags |= RX_ENC_FLAG_HT_GF; - /* fall through */ + fallthrough; case MT_PHY_TYPE_HT: status->encoding = RX_ENC_HT; status->rate_idx = idx; diff --git a/drivers/net/wireless/mediatek/mt7601u/phy.c b/drivers/net/wireless/mediatek/mt7601u/phy.c index d863ab4a66c9..430ae4c1d7db 100644 --- a/drivers/net/wireless/mediatek/mt7601u/phy.c +++ b/drivers/net/wireless/mediatek/mt7601u/phy.c @@ -787,7 +787,7 @@ mt7601u_phy_rf_pa_mode_val(struct mt7601u_dev *dev, int phy_mode, int tx_rate) switch (phy_mode) { case MT_PHY_TYPE_OFDM: tx_rate += 4; - /* fall through */ + fallthrough; case MT_PHY_TYPE_CCK: reg = dev->rf_pa_mode[0]; break;