From patchwork Wed Nov 28 04:33:04 2018 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: 10701867 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 A99AA14BD for ; Wed, 28 Nov 2018 04:33:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 998FE2C67A for ; Wed, 28 Nov 2018 04:33:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E20F2C6CF; Wed, 28 Nov 2018 04:33:08 +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 359A52C67A for ; Wed, 28 Nov 2018 04:33:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727238AbeK1PdU (ORCPT ); Wed, 28 Nov 2018 10:33:20 -0500 Received: from gateway21.websitewelcome.com ([192.185.45.250]:33038 "EHLO gateway21.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727211AbeK1PdU (ORCPT ); Wed, 28 Nov 2018 10:33:20 -0500 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 7F7C1400E1032 for ; Tue, 27 Nov 2018 22:33:06 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id RrX8gAwHuSjJARrX8gYOpf; Tue, 27 Nov 2018 22:33:06 -0600 X-Authority-Reason: nr=8 Received: from [189.250.78.127] (port=58370 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.91) (envelope-from ) id 1gRrX7-001pj0-3I; Tue, 27 Nov 2018 22:33:05 -0600 Date: Tue, 27 Nov 2018 22:33:04 -0600 From: "Gustavo A. R. Silva" To: Willem Riede , osst-users@lists.sourceforge.net Cc: "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH 34/41] scsi: osst: mark expected switch fall-throughs Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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.78.127 X-Source-L: No X-Exim-ID: 1gRrX7-001pj0-3I X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.250.78.127]:58370 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 240 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 In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114983 ("Missing break in switch") Addresses-Coverity-ID: 114984 ("Missing break in switch") Addresses-Coverity-ID: 114985 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/osst.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 664c1238a87f..7e877b43785d 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c @@ -216,12 +216,14 @@ static void osst_analyze_sense(struct osst_request *SRpnt, struct st_cmdstatus * switch (sense[0] & 0x7f) { case 0x71: s->deferred = 1; + /* fall through */ case 0x70: s->fixed_format = 1; s->flags = sense[2] & 0xe0; break; case 0x73: s->deferred = 1; + /* fall through */ case 0x72: s->fixed_format = 0; ucp = scsi_sense_desc_find(sense, SCSI_SENSE_BUFFERSIZE, 4); @@ -591,6 +593,7 @@ static void osst_init_aux(struct osst_tape * STp, int frame_type, int frame_seq_ dat->dat_list[0].flags = frame_type==OS_FRAME_TYPE_MARKER? OS_DAT_FLAGS_MARK:OS_DAT_FLAGS_DATA; dat->dat_list[0].reserved = 0; + /* fall through */ case OS_FRAME_TYPE_EOD: aux->update_frame_cntr = htonl(0); par->partition_num = OS_DATA_PARTITION; @@ -4086,6 +4089,7 @@ static int osst_int_ioctl(struct osst_tape * STp, struct osst_request ** aSRpnt, switch (cmd_in) { case MTFSFM: chg_eof = 0; /* Changed from the FSF after this */ + /* fall through */ case MTFSF: if (STp->raw) return (-EIO); @@ -4101,6 +4105,7 @@ static int osst_int_ioctl(struct osst_tape * STp, struct osst_request ** aSRpnt, case MTBSF: chg_eof = 0; /* Changed from the FSF after this */ + /* fall through */ case MTBSFM: if (STp->raw) return (-EIO); @@ -4312,6 +4317,7 @@ static int osst_int_ioctl(struct osst_tape * STp, struct osst_request ** aSRpnt, name, STp->block_size); return 0; } + /* fall through */ case MTSETDENSITY: /* Set tape density */ case MTSETDRVBUFFER: /* Set drive buffering */ case SET_DENS_AND_BLK: /* Set density and block size */