From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AE93C32751 for ; Wed, 31 Jul 2019 11:35:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD764206A3 for ; Wed, 31 Jul 2019 11:35:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726822AbfGaLfX (ORCPT ); Wed, 31 Jul 2019 07:35:23 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:62290 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387574AbfGaLdY (ORCPT ); Wed, 31 Jul 2019 07:33:24 -0400 Received-SPF: Pass (esa3.microchip.iphmx.com: domain of Ludovic.Desroches@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa3.microchip.iphmx.com; envelope-from="Ludovic.Desroches@microchip.com"; x-sender="Ludovic.Desroches@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa3.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa3.microchip.iphmx.com; envelope-from="Ludovic.Desroches@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa3.microchip.iphmx.com; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=Ludovic.Desroches@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: R7AozpEsiUeC+4/7Dc7j4pVNUsX9pjR2XB3pzZMFDh6QAPI5tFCjtoBTPiH537hIRDBOjlpeS+ fGQlqjOs6wKIM7hBji0uinb5XRla0cEiMJmS/d5ttVP6Q5oFkjWk4yecUbJjVaeCqrYSVxnK4u KTwfH+m1/OH9WDxZYSuXA7XFlAJatLiXphOEGTjhCCrEhVAf1YbKSJQq8geuFZ041aOkUDXHyd AMYU/8P/E+Vu33yYo1XKVHkutu560EEG+jBBn+YHq8oPA9dduSLqR5F5X2zgiI8f/KuGp3cpyA UUo= X-IronPort-AV: E=Sophos;i="5.64,330,1559545200"; d="scan'208";a="43442093" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 31 Jul 2019 04:33:23 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 31 Jul 2019 04:33:11 -0700 Received: from localhost (10.10.85.251) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Wed, 31 Jul 2019 04:33:11 -0700 Date: Wed, 31 Jul 2019 13:32:16 +0200 From: Ludovic Desroches To: "Gustavo A. R. Silva" CC: Ulf Hansson , Nicolas Ferre , Alexandre Belloni , , , , Stephen Rothwell , Kees Cook Subject: Re: [PATCH] mmc: atmel-mci: Mark expected switch fall-throughs Message-ID: <20190731113216.ztxckd54a74g2lw5@M43218.corp.atmel.com> Mail-Followup-To: "Gustavo A. R. Silva" , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stephen Rothwell , Kees Cook References: <20190729000123.GA23902@embeddedor> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190729000123.GA23902@embeddedor> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sun, Jul 28, 2019 at 07:01:23PM -0500, Gustavo A. R. Silva wrote: > > Mark switch cases where we are expecting to fall through. > > This patch fixes the following warnings: > > drivers/mmc/host/atmel-mci.c: In function 'atmci_get_cap': > drivers/mmc/host/atmel-mci.c:2415:30: warning: this statement may fall through [-Wimplicit-fallthrough=] > host->caps.has_odd_clk_div = 1; > ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ > drivers/mmc/host/atmel-mci.c:2416:2: note: here > case 0x400: > ^~~~ > drivers/mmc/host/atmel-mci.c:2422:28: warning: this statement may fall through [-Wimplicit-fallthrough=] > host->caps.has_highspeed = 1; > ~~~~~~~~~~~~~~~~~~~~~~~~~^~~ > drivers/mmc/host/atmel-mci.c:2423:2: note: here > case 0x200: > ^~~~ > drivers/mmc/host/atmel-mci.c:2426:40: warning: this statement may fall through [-Wimplicit-fallthrough=] > host->caps.need_notbusy_for_read_ops = 1; > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ > drivers/mmc/host/atmel-mci.c:2427:2: note: here > case 0x100: > ^~~~ > > Reported-by: Stephen Rothwell > Signed-off-by: Gustavo A. R. Silva I don't know if there is a policy in the kernel about the expression to use. As this one does the job Acked-by: Ludovic Desroches Thanks > --- > drivers/mmc/host/atmel-mci.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c > index 9ee0bc0ce6d0..c26fbe5f2222 100644 > --- a/drivers/mmc/host/atmel-mci.c > +++ b/drivers/mmc/host/atmel-mci.c > @@ -2413,6 +2413,7 @@ static void atmci_get_cap(struct atmel_mci *host) > case 0x600: > case 0x500: > host->caps.has_odd_clk_div = 1; > + /* Fall through */ > case 0x400: > case 0x300: > host->caps.has_dma_conf_reg = 1; > @@ -2420,13 +2421,16 @@ static void atmci_get_cap(struct atmel_mci *host) > host->caps.has_cfg_reg = 1; > host->caps.has_cstor_reg = 1; > host->caps.has_highspeed = 1; > + /* Fall through */ > case 0x200: > host->caps.has_rwproof = 1; > host->caps.need_blksz_mul_4 = 0; > host->caps.need_notbusy_for_read_ops = 1; > + /* Fall through */ > case 0x100: > host->caps.has_bad_data_ordering = 0; > host->caps.need_reset_after_xfer = 0; > + /* Fall through */ > case 0x0: > break; > default: > -- > 2.22.0 > >