From patchwork Thu Mar 15 15:08:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10284721 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 19A31602BD for ; Thu, 15 Mar 2018 15:08:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EC1128B0B for ; Thu, 15 Mar 2018 15:08:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0398628B1F; Thu, 15 Mar 2018 15:08:38 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 96B7A28B0B for ; Thu, 15 Mar 2018 15:08:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752800AbeCOPIa (ORCPT ); Thu, 15 Mar 2018 11:08:30 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:46680 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752759AbeCOPI2 (ORCPT ); Thu, 15 Mar 2018 11:08:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1521127616; x=1552663616; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=RDcSwyaul2xpVyXENWkSfUhK8jklOf0YKJYqzcL4k3I=; b=c/6qawA5o4AhtA11S2pvgGpQj1TEGoXRrMPhgW5Vi4Ak/HlpnUQBA5ov OejTjeyjKCtJGQn4LDsQFWd0NUxeS/wFUX9g/cMO0pEwYgsN7B/f+aSJ4 KGedWXcuHkrF0wSY03YDMAiUfidVcJs4tDsYnzEKnIt6uZB9+Q6jMbGwD wGrMpdO2yMouGFuRI+Ekt3QxpC89O9iFBF4DlQBLV52nB3TrAnXcgMYI6 500C4RIA9A7WmfzEj7TROues092OEXIybghD+s3vJccT39MLd855K8/NR 8HZd7sKR+v2BeD5Y7iqYHBsQjRFNC6t3x4uEGnnQvz0OWxfOl69XpZeOK A==; X-IronPort-AV: E=Sophos;i="5.47,471,1515427200"; d="scan'208";a="170233263" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Mar 2018 23:26:35 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 15 Mar 2018 08:01:13 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com (HELO thinkpad-bart.int.fusionio.com) ([10.11.171.236]) by uls-op-cesaip02.wdc.com with ESMTP; 15 Mar 2018 08:08:15 -0700 From: Bart Van Assche To: Michael Lyle , Kent Overstreet , Coly Li Cc: linux-block@vger.kernel.org, Christoph Hellwig , Bart Van Assche Subject: [PATCH 03/16] bcache: Annotate switch fall-through Date: Thu, 15 Mar 2018 08:08:01 -0700 Message-Id: <20180315150814.9412-4-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180315150814.9412-1-bart.vanassche@wdc.com> References: <20180315150814.9412-1-bart.vanassche@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch avoids that building with W=1 triggers complaints about switch fall-throughs. Signed-off-by: Bart Van Assche Reviewed-by: Coly Li --- drivers/md/bcache/util.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/md/bcache/util.c b/drivers/md/bcache/util.c index a23cd6a14b74..6198041f0ee2 100644 --- a/drivers/md/bcache/util.c +++ b/drivers/md/bcache/util.c @@ -32,20 +32,27 @@ int bch_ ## name ## _h(const char *cp, type *res) \ case 'y': \ case 'z': \ u++; \ + /* fall through */ \ case 'e': \ u++; \ + /* fall through */ \ case 'p': \ u++; \ + /* fall through */ \ case 't': \ u++; \ + /* fall through */ \ case 'g': \ u++; \ + /* fall through */ \ case 'm': \ u++; \ + /* fall through */ \ case 'k': \ u++; \ if (e++ == cp) \ return -EINVAL; \ + /* fall through */ \ case '\n': \ case '\0': \ if (*e == '\n') \