From patchwork Thu Nov 2 18:41:07 2017 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: 10039203 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AAFF160291 for ; Thu, 2 Nov 2017 18:43:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E3F42930A for ; Thu, 2 Nov 2017 18:43:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9331E2930F; Thu, 2 Nov 2017 18:43:19 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 650242930A for ; Thu, 2 Nov 2017 18:43:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAKQS-0001Yd-U4; Thu, 02 Nov 2017 18:41:12 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAKQR-0001YT-CT for xen-devel@lists.xenproject.org; Thu, 02 Nov 2017 18:41:11 +0000 Received: from [193.109.254.147] by server-1.bemta-6.messagelabs.com id F4/CC-30079-6C66BF95; Thu, 02 Nov 2017 18:41:10 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrIKsWRWlGSWpSXmKPExsVyYKfxKd1jab8 jDa5tZbP4vmUykwOjx+EPV1gCGKNYM/OS8isSWDPm7T7MVHCSo6L31Er2BsaT7F2MXBxCAg8Y JVo+XYNyuhgl7ly5zwzhXGSU2Pn3NpDDycEioCIxfftCpi5GDg42AVOJ8xtMQUwRgSCJr5uZQ CqYBYokPn/YDmYLCwRIfH06nxHE5hUwkrjS08UMYQtKnJz5hAWiXkvixr+XYBOZBaQllv/jAD FFgRa9OlgPUiEhECXxd/dVFgjbXOLVrJNsELaxxMtXC5ghbCuJ34fXsMDEG9f+Z4ewBSTa/px khbClJf42zIGy+SROvHjOBhN/3XKVEcLmkjgwdR5UnF/i8Ox7jDD1+xZugIqbSByb9AQqriax ecc8VpCTQXat2uYCEXaTuPHwIxOELSxx8NMrxgmMcrOQ/D4Lye+zEH5fwMi8ilG9OLWoLLVI1 1wvqSgzPaMkNzEzR9fQwEwvN7W4ODE9NScxqVgvOT93EyMwyhmAYAfjzMv+hxglOZiURHnvbv wVKcSXlJ9SmZFYnBFfVJqTWnyIUYaDQ0mC91fq70ghwaLU9NSKtMwcYLqBSUtw8CiJ8AoCU44 Qb3FBYm5xZjpE6hSjJcexTZf/MHFcenULSD6b+bqBWYglLz8vVUqc9y7IPAGQhozSPLhxsJR4 iVFWSpiXEehAIZ6C1KLczBJU+VeM4hyMSsK8f0Cm8GTmlcBtfQV0EBPQQV4SP0AOKklESEk1M M6cuvUNe6bcf8fF38WYFTknXHDN+tiWeZZTrVHl3We5cEu7d8/uNE+bdiZPpP7MInftPkupez dO3hBn3bZ57Zf4SvHcMydbnJ6f6q46WOLexJahKbqQc/nu9c7FE2KZp/rZ5itp6gZMM7r9m/v f5KnXHOeF1jpda9XLSDD7cdG2UUPsruoZGyWW4oxEQy3mouJEAOIjP+yEAwAA X-Env-Sender: garsilva@embeddedor.com X-Msg-Ref: server-16.tower-27.messagelabs.com!1509648069!114319461!1 X-Originating-IP: [192.185.51.202] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 55039 invoked from network); 2 Nov 2017 18:41:09 -0000 Received: from gateway24.websitewelcome.com (HELO gateway24.websitewelcome.com) (192.185.51.202) by server-16.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 2 Nov 2017 18:41:09 -0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway24.websitewelcome.com (Postfix) with ESMTP id D27D33DD01 for ; Thu, 2 Nov 2017 13:41:08 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id AKQOew6G1c72gAKQOeuIEM; Thu, 02 Nov 2017 13:41:08 -0500 Received: from [189.145.38.148] (port=38852 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.87) (envelope-from ) id 1eAKQO-000Quq-D5; Thu, 02 Nov 2017 13:41:08 -0500 Date: Thu, 2 Nov 2017 13:41:07 -0500 From: "Gustavo A. R. Silva" To: Boris Ostrovsky , Juergen Gross Message-ID: <20171102184107.GA2579@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.xenproject.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.145.38.148 X-Source-L: No X-Exim-ID: 1eAKQO-000Quq-D5 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.145.38.148]:38852 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 3 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Cc: xen-devel@lists.xenproject.org, "Gustavo A. R. Silva" , linux-kernel@vger.kernel.org Subject: [Xen-devel] [PATCH] xen: xenbus_probe_frontend: mark expected switch fall-throughs X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" 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: 146562 Addresses-Coverity-ID: 146563 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Juergen Gross --- drivers/xen/xenbus/xenbus_probe_frontend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c index 19e45ce..07896f4 100644 --- a/drivers/xen/xenbus/xenbus_probe_frontend.c +++ b/drivers/xen/xenbus/xenbus_probe_frontend.c @@ -379,10 +379,12 @@ static void xenbus_reset_frontend(char *fe, char *be, int be_state) case XenbusStateConnected: xenbus_printf(XBT_NIL, fe, "state", "%d", XenbusStateClosing); xenbus_reset_wait_for_backend(be, XenbusStateClosing); + /* fall through */ case XenbusStateClosing: xenbus_printf(XBT_NIL, fe, "state", "%d", XenbusStateClosed); xenbus_reset_wait_for_backend(be, XenbusStateClosed); + /* fall through */ case XenbusStateClosed: xenbus_printf(XBT_NIL, fe, "state", "%d", XenbusStateInitialising);