Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp81285pxb; Wed, 18 Aug 2021 16:33:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyxSjC7tiXzEq3L22f42LiHQlfZPkXv3c6MTnGlUzG7qx4ULiwgXqLnTtSxSWAPxYyTvRn X-Received: by 2002:aa7:c548:: with SMTP id s8mr13340684edr.162.1629329628838; Wed, 18 Aug 2021 16:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629329628; cv=none; d=google.com; s=arc-20160816; b=pQrIpuAYDslIdrpID/H89ybAS2X3eFHR/Lwe1uii6cFNjmUhHPUDXDwpeC5JWsDp08 cBkqDuJ0QYbpfokeMbCIYrlSZOgOro/yfFLXfMJw7jIdR11TbzleEP78Tiwf+xh5g0Y4 PvyBEuV/Tse6L+7zhHaKe5P2+byelE20wDUQnRpuU8yYfW/SAGuTcgiO4gzi9NjUybQO a/nMMm9L9Qy/LL7PK6pgXPffBIenmeCeKTEy0aDEAupWjVDaFeY7Vio9MApmMPUI8l6q 3sq9c5Q8wcH3UYDv4lyx4b644Fh4zGJVEICF4RgwqPvOFJ7OA5USlyZP9c0eEMxIyrRt Aonw== 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:from:references :cc:to:subject:dkim-signature; bh=R9guw5PE76FgClxuJjVAZUj6OKVVXc+a8I8XM8qj1WU=; b=ZhPHyfK8BZ3Q5WHXMoxpu2PPqVMWV5M3DkeYIwLMRwwHrx7Lv72059CM4gS+VrIj4U HMAmCI1Y3dqmcEs227j7IiAT7fn2Dg3JgfcMTHrb//IRMiBTyjb9YYc21w4Tn1ez2XxB lyAGaAQmjGumiqyuoZDTtD9UPL6ckDMo1YX8RvFuAbkby21ccmd2Ja82+fdujmYZoIXx y/Ue7JGjad86Akq3w/KsQ7hu8v0nmO40IipkpPBvsxkaRbw9k/madyomdVd1EJiqVUFL QxXFnQ6MBX4VaBiWTonFdfGDLUhw8CJlHyq3jJB6TLH9eEKYq5+b2E6qBH6artSQVEiB nLnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zcii3h2F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si1288552edf.568.2021.08.18.16.33.25; Wed, 18 Aug 2021 16:33:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=Zcii3h2F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234889AbhHRXcn (ORCPT + 99 others); Wed, 18 Aug 2021 19:32:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:41776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234860AbhHRXcl (ORCPT ); Wed, 18 Aug 2021 19:32:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CB84D610D2; Wed, 18 Aug 2021 23:32:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629329524; bh=92kdq27t3ep5Hl3CuE79QJIJv2tMQV5f2MwnOw6G9JA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Zcii3h2FvPs7aZiU5Yl8FCf9QQ15f1cbmEqGhphc5VGNoAaNUg4JDqO8DkAXVlo4b rkOqTpRVTZQvVqxHvfncXdWIv7hHKtPyKwiTX4Sm2dTucGGck1odMUA73zyW/rViXF KdM3rRTroNWX44eFpcWiHJ/uCaoqimTc585TZz39UExVtHVXyYAJkyhbQzpfA05x02 ADa2bjnUqYRA+JyG2Ohzanfe6yMIOI9oMUqLxU0Qt0itWTdrzQxSJphZsc+JovndrP 5x7Hg3ers9jwZ5Iv14bgfKOu6UQLhwLIBlAtOimypL7dhY9PoJLgOyfdjYEXmqpHAN GPhUo8/1CKw0g== Subject: Re: [PATCH][next] staging: r8188eu: Fix fall-through warnings for Clang To: "Gustavo A. R. Silva" , Larry Finger , Phillip Potter , Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20210818221418.GA311735@embeddedor> From: Nathan Chancellor Message-ID: Date: Wed, 18 Aug 2021 16:32:03 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210818221418.GA311735@embeddedor> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/18/2021 3:14 PM, Gustavo A. R. Silva wrote: > Fix the following fallthrough warnings: > > drivers/staging/r8188eu/core/rtw_mlme_ext.c:1498:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > drivers/staging/r8188eu/core/rtw_wlan_util.c:1113:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > drivers/staging/r8188eu/core/rtw_wlan_util.c:1147:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > drivers/staging/r8188eu/core/rtw_wlan_util.c:1405:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > > This helps with the ongoing efforts to globally enable > -Wimplicit-fallthrough for Clang. > > Link: https://github.com/KSPP/linux/issues/115 > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Nathan Chancellor One small comment below. > --- > drivers/staging/r8188eu/core/rtw_mlme_ext.c | 1 + > drivers/staging/r8188eu/core/rtw_wlan_util.c | 3 +++ > 2 files changed, 4 insertions(+) > > diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c > index 61b239651e1a..590a4572c23f 100644 > --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c > +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c > @@ -1495,6 +1495,7 @@ unsigned int OnAssocRsp(struct adapter *padapter, struct recv_frame *precv_frame > break; > case _ERPINFO_IE_: > ERP_IE_handler(padapter, pIE); > + break; > default: > break; > } > diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c > index cddacf023fa6..e0ce2b796abe 100644 > --- a/drivers/staging/r8188eu/core/rtw_wlan_util.c > +++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c > @@ -1110,6 +1110,7 @@ unsigned int is_ap_in_tkip(struct adapter *padapter) > case _RSN_IE_2_: > if (!memcmp((pIE->data + 8), RSN_TKIP_CIPHER, 4)) > return true; > + break; > default: > break; > } > @@ -1144,6 +1145,7 @@ unsigned int should_forbid_n_rate(struct adapter *padapter) > if ((!memcmp((pIE->data + 8), RSN_CIPHER_SUITE_CCMP, 4)) || > (!memcmp((pIE->data + 12), RSN_CIPHER_SUITE_CCMP, 4))) > return false; > + break; > default: > break; > } > @@ -1401,6 +1403,7 @@ unsigned char check_assoc_AP(u8 *pframe, uint len) > } else { > break; > } > + break; Would it be better to just remove the else branch at the same time? As far as I can tell, there is no reason to have it. > > default: > break; >