Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5865181ybi; Wed, 31 Jul 2019 04:36:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNokRvQsxoGiZQf7VDJbQIPqMnrKZ6r/BiUcyAJfyR8LWbASVGc+mQDcypBmiT3uKyMpN8 X-Received: by 2002:a65:64c6:: with SMTP id t6mr115762875pgv.323.1564572971053; Wed, 31 Jul 2019 04:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564572971; cv=none; d=google.com; s=arc-20160816; b=o3gmDX5GaSugln0lsh74UKshtdWfZ2QaRN7zLsOpNKGVE24AlO8vIfYi7Y87jp2hOT TLGFbWG4z+Oz54HIssTCmIEtSXI4WJ8MGILZfY7rpIWHB2G72Gp5nD4Stlc2km+kUkiF AAh5aPzudnWwJagVRRsvNEfR6lb+hi6+TRizzw42C6as1R9L9A41eRPU0GrEp/m97XdV Tga83sh87gsyUsKET6biJevjvO6ni9eDMWiYGB3WO0C61hq54dj9QcOexw2FOLDm9ykh u23+A4rOPK3SkTODW/8diPj+txPjnHchJHUEaWtWdKClD2JtwobUODGAGSTIuQMAm/A3 84NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:ironport-sdr; bh=u+PWYOjUAi/2rCHCQGUnJMhRR6xPAPcMGc9knnOtfaU=; b=xv1ACxDSnus94GFR+j403AWizRWMe4i073IO5roB8ARqvt+GeJQA7nsMCBk8z8YaKB WuU9K3Xe7JcTlSVyqRYAK5rsMit8f2BTviWGKIat2LZ98PXAJo7Q0YkYDxxd+D9s16UF am8mc08Q5+BbUx5nDDy2Mp1btZ4U8i38SLDr+I4bC0w8VzSK2zlCECaZWgoHkXzN/AKf SpEu8BnJqJcL/AjZKcUPwmIRoojfPe/HhVZ/0RZvaQmu9igck7uol8CzP1z8ak+i1icB WC3UL07zbkk3q/1g0EUqJoFSTZc8ulQd1TP4YwGt96sCbY2SH73WkNOmM5dm1l9GvTq8 BJZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gb4si30729945plb.429.2019.07.31.04.35.55; Wed, 31 Jul 2019 04:36:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726787AbfGaLfX (ORCPT + 99 others); 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 > >