From patchwork Fri Feb 15 21:54:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 10816079 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1ECB31390 for ; Fri, 15 Feb 2019 22:40:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 090FB2FD5E for ; Fri, 15 Feb 2019 22:40:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF5A03013D; Fri, 15 Feb 2019 22:40:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91F9A2FD5E for ; Fri, 15 Feb 2019 22:40:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403982AbfBOWkc (ORCPT ); Fri, 15 Feb 2019 17:40:32 -0500 Received: from gateway34.websitewelcome.com ([192.185.147.201]:26287 "EHLO gateway34.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393447AbfBOWk2 (ORCPT ); Fri, 15 Feb 2019 17:40:28 -0500 X-Greylist: delayed 1500 seconds by postgrey-1.27 at vger.kernel.org; Fri, 15 Feb 2019 17:40:27 EST Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 1CC24419D for ; Fri, 15 Feb 2019 15:54:16 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id ulR2gQk4D90onulR2gnXlP; Fri, 15 Feb 2019 15:54:16 -0600 X-Authority-Reason: nr=8 Received: from [189.250.119.20] (port=58134 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.91) (envelope-from ) id 1gulR1-000xaO-5v; Fri, 15 Feb 2019 15:54:15 -0600 Date: Fri, 15 Feb 2019 15:54:14 -0600 From: "Gustavo A. R. Silva" To: Sathya Prakash , Chaitra P B , Suganath Prabu Subramani , "James E.J. Bottomley" , "Martin K. Petersen" Cc: MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , Kees Cook Subject: [PATCH] scsi: mpt3sas: Add missing breaks in switch statements Message-ID: <20190215215414.GA10944@embeddedor> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.250.119.20 X-Source-L: No X-Exim-ID: 1gulR1-000xaO-5v X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.250.119.20]:58134 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 14 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the following warnings by adding the proper missing breaks: drivers/scsi/mpt3sas/mpt3sas_base.c: In function ‘_base_display_OEMs_branding’: drivers/scsi/mpt3sas/mpt3sas_base.c:3548:4: warning: this statement may fall through [-Wimplicit-fallthrough=] switch (ioc->pdev->subsystem_device) { ^~~~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:3566:3: note: here case MPI2_MFGPAGE_DEVID_SAS2308_2: ^~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:3567:4: warning: this statement may fall through [-Wimplicit-fallthrough=] switch (ioc->pdev->subsystem_device) { ^~~~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:3601:3: note: here case MPI25_MFGPAGE_DEVID_SAS3008: ^~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:3735:4: warning: this statement may fall through [-Wimplicit-fallthrough=] switch (ioc->pdev->subsystem_device) { ^~~~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:3745:3: note: here case MPI2_MFGPAGE_DEVID_SAS2308_2: ^~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:3746:4: warning: this statement may fall through [-Wimplicit-fallthrough=] switch (ioc->pdev->subsystem_device) { ^~~~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:3768:3: note: here default: ^~~~~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 0a6cb8f0680c..e57774472e75 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -3563,6 +3563,7 @@ _base_display_OEMs_branding(struct MPT3SAS_ADAPTER *ioc) ioc->pdev->subsystem_device); break; } + break; case MPI2_MFGPAGE_DEVID_SAS2308_2: switch (ioc->pdev->subsystem_device) { case MPT2SAS_INTEL_RS25GB008_SSDID: @@ -3598,6 +3599,7 @@ _base_display_OEMs_branding(struct MPT3SAS_ADAPTER *ioc) ioc->pdev->subsystem_device); break; } + break; case MPI25_MFGPAGE_DEVID_SAS3008: switch (ioc->pdev->subsystem_device) { case MPT3SAS_INTEL_RMS3JC080_SSDID: @@ -3742,6 +3744,7 @@ _base_display_OEMs_branding(struct MPT3SAS_ADAPTER *ioc) ioc->pdev->subsystem_device); break; } + break; case MPI2_MFGPAGE_DEVID_SAS2308_2: switch (ioc->pdev->subsystem_device) { case MPT2SAS_HP_2_4_INTERNAL_SSDID: @@ -3765,6 +3768,7 @@ _base_display_OEMs_branding(struct MPT3SAS_ADAPTER *ioc) ioc->pdev->subsystem_device); break; } + break; default: ioc_info(ioc, "HP SAS HBA: Subsystem ID: 0x%X\n", ioc->pdev->subsystem_device);