From patchwork Mon Mar 19 00:36:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Lyle X-Patchwork-Id: 10291483 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 15A4460291 for ; Mon, 19 Mar 2018 00:37:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07B2D28D4B for ; Mon, 19 Mar 2018 00:37:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0A6C28F56; Mon, 19 Mar 2018 00:37:09 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 9FCAF28D4B for ; Mon, 19 Mar 2018 00:37:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754823AbeCSAhI (ORCPT ); Sun, 18 Mar 2018 20:37:08 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:43680 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754721AbeCSAg6 (ORCPT ); Sun, 18 Mar 2018 20:36:58 -0400 Received: by mail-pl0-f66.google.com with SMTP id f23-v6so9219243plr.10 for ; Sun, 18 Mar 2018 17:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyle-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ncbadaSR8Xx7yhY00qvF4DyChuf1A1AAbSxhvc4DqEM=; b=SySagnIuh2Kjt43tEhhiWMhCBAz7MgccJcxcIricIEjDHu3cDCSwbE2ZExImZXGNA9 QZmaX23JkW5LjbqnRRcGBrdMwRAs8s7rr3/KnXMhwk7mMNrVIadSmn1+WayoiL0HmX7l vxtLP2cJJ7z2ngskNugc+Qq2jjYqDrF28No4LSEU2sGfxY0EY5k1u6mBZCBkRZWhLZ28 mj6tOphxiW7R6lCVnT1iaedZc90cR4VF9Df75MLy8SZWf8v0DECAeYF/LsmVKO7UG3LI 48KIWTNUa3bday81tTnbrxhi4QYo2GrAV9fv7JJkFFlGbCooxfX5zszQnglCpUK1AQ9q p5HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ncbadaSR8Xx7yhY00qvF4DyChuf1A1AAbSxhvc4DqEM=; b=k9dWQjSeuszZZ7scabs/UMlD+2d3HEOJHIKsCo1lKQVhmHfOwTG14wwGJfLzFrqbaf yfIN4mkLJwvFderITLbvFUaQ0ZATNXJH30jRSIfS8ANk1YTGII55Lr2mpz9zTrftC4MK peApRPuXGdrwT5215iancVJiszQOucNRbRUujwCFCF3ZtxHgEkLmz+iXgGBAu7JrfH/a EJNxCLIcWqziaCKFwILVvoprrm5uM3FBoHyDgId4gKPsju4LbdIORLh+z4Dmx4+S8NHn RCYUcdVztVjj5i935xoWrEyIXiX+WV0NAvEn7bnkgdOyT/cVLKt6X/+QowEc12Boyjcq bQDQ== X-Gm-Message-State: AElRT7F3NJ+0n9xhy/WveuFSJoAs98n9u74m6NXYG23oNfe2xU2mcQCU Snkj261ivaILoqbHnPvfr747LQ== X-Google-Smtp-Source: AG47ELtOt2QAeOXcVx9Y9EgM7IvTa8p7iFEsYAvVRLgDVScWMZgDZudjXHmxmD2XSE/Phhp9kCjDpg== X-Received: by 2002:a17:902:4481:: with SMTP id l1-v6mr10513132pld.43.1521419818423; Sun, 18 Mar 2018 17:36:58 -0700 (PDT) Received: from midnight.lan (2600-6c52-6200-09b7-0000-0000-0000-0d66.dhcp6.chtrptr.net. [2600:6c52:6200:9b7::d66]) by smtp.gmail.com with ESMTPSA id a17sm27674857pfc.122.2018.03.18.17.36.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Mar 2018 17:36:57 -0700 (PDT) From: Michael Lyle To: linux-bcache@vger.kernel.org, linux-block@vger.kernel.org Cc: axboe@fb.com, Bart Van Assche Subject: [for-4.17 15/20] bcache: Annotate switch fall-through Date: Sun, 18 Mar 2018 17:36:28 -0700 Message-Id: <20180319003633.27225-16-mlyle@lyle.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180319003633.27225-1-mlyle@lyle.org> References: <20180319003633.27225-1-mlyle@lyle.org> 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 From: Bart Van Assche This patch avoids that building with W=1 triggers complaints about switch fall-throughs. Signed-off-by: Bart Van Assche Reviewed-by: Michael Lyle --- 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') \