From patchwork Wed Aug 15 17:02:26 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: 957985 X-Patchwork-Delegate: boris.brezillon@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embeddedor.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ECti+Gl6"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41rG4c1g0Nz9sBq for ; Thu, 16 Aug 2018 03:03:09 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=RoXWR3+PW4vSK5N7by7s2drpv5p2+w8Gc954eRF+jvk=; b=ECti+Gl6bDGR8Y GacBdiegpkXjMjZWKnsN2jURbM2SEz+FeqF9WWyFvbe9SXfOYwap/Un6xkbOeCxYceMRzuqXDhtVz 34Fk3AP4VPJNgSYiw9kaJeqeckYS+qeINwksfDjJMpY9cRXQNdPepEWCS/NqHUb5lvJiCVMENRP1m ZqZcxzdl8M8O86KDh7ZXQqEcZcyEmiKR0nkO2aWYSzKjKYZdzsUT4T3Dfg+BxMPgwYqFFAsT87Ix4 qAz9iFF48c1yh/v0dCqO1GPU1/o6PaBJW/0PnUm5cNB2H+D5kPFWbQf2Jw8F88Wlpectw/u18J6a7 zgW0mDrAhBNU905LLf9Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpzCI-0007jL-4M; Wed, 15 Aug 2018 17:03:02 +0000 Received: from gateway30.websitewelcome.com ([192.185.149.4]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpzCE-0007hk-CA for linux-mtd@lists.infradead.org; Wed, 15 Aug 2018 17:02:59 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 070BA4D101 for ; Wed, 15 Aug 2018 12:02:36 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id pzBlfBUO9BcCXpzBqfjPTT; Wed, 15 Aug 2018 12:02:35 -0500 X-Authority-Reason: nr=8 Received: from [189.250.37.72] (port=60314 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.91) (envelope-from ) id 1fpzBk-004KFO-1q; Wed, 15 Aug 2018 12:02:28 -0500 Date: Wed, 15 Aug 2018 12:02:26 -0500 From: "Gustavo A. R. Silva" To: David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger Subject: [PATCH] mtd: cfi_cmdset_0020: Mark expected switch fall-throughs Message-ID: <20180815170226.GA14553@embeddedor.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) 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 - lists.infradead.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.37.72 X-Source-L: No X-Exim-ID: 1fpzBk-004KFO-1q X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.250.37.72]:60314 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 6 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180815_100258_522477_B8098BD5 X-CRM114-Status: UNSURE ( 8.66 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [192.185.149.4 listed in list.dnswl.org] 0.0 T_SPF_PERMERROR SPF: test of record failed (permerror) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114857 ("Missing break in switch") Addresses-Coverity-ID: 114858 ("Missing break in switch") Addresses-Coverity-ID: 114859 ("Missing break in switch") Addresses-Coverity-ID: 114860 ("Missing break in switch") Addresses-Coverity-ID: 114861 ("Missing break in switch") Addresses-Coverity-ID: 114862 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/mtd/chips/cfi_cmdset_0020.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c index 35aa72b..e752067 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c @@ -324,6 +324,7 @@ static inline int do_read_onechip(struct map_info *map, struct flchip *chip, lof case FL_JEDEC_QUERY: map_write(map, CMD(0x70), cmd_addr); chip->state = FL_STATUS; + /* Fall through */ case FL_STATUS: status = map_read(map, cmd_addr); @@ -461,6 +462,7 @@ static int do_write_buffer(struct map_info *map, struct flchip *chip, #ifdef DEBUG_CFI_FEATURES printk("%s: 1 status[%x]\n", __func__, map_read(map, cmd_adr)); #endif + /* Fall through */ case FL_STATUS: status = map_read(map, cmd_adr); @@ -754,6 +756,7 @@ static inline int do_erase_oneblock(struct map_info *map, struct flchip *chip, u case FL_READY: map_write(map, CMD(0x70), adr); chip->state = FL_STATUS; + /* Fall through */ case FL_STATUS: status = map_read(map, adr); @@ -995,6 +998,7 @@ static void cfi_staa_sync (struct mtd_info *mtd) * as the whole point is that nobody can do anything * with the chip now anyway. */ + /* Fall through */ case FL_SYNCING: mutex_unlock(&chip->mutex); break; @@ -1050,6 +1054,7 @@ static inline int do_lock_oneblock(struct map_info *map, struct flchip *chip, un case FL_READY: map_write(map, CMD(0x70), adr); chip->state = FL_STATUS; + /* Fall through */ case FL_STATUS: status = map_read(map, adr); @@ -1196,6 +1201,7 @@ static inline int do_unlock_oneblock(struct map_info *map, struct flchip *chip, case FL_READY: map_write(map, CMD(0x70), adr); chip->state = FL_STATUS; + /* Fall through */ case FL_STATUS: status = map_read(map, adr);