Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2687211imu; Mon, 17 Dec 2018 06:17:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/UiNkzQwndl60e4ksJsFkweDh9q1lakMK2+7NXYoO+TYh+DPzJMzEJvphRLh8f8wocTizl1 X-Received: by 2002:a17:902:4624:: with SMTP id o33mr12578617pld.289.1545056258550; Mon, 17 Dec 2018 06:17:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545056258; cv=none; d=google.com; s=arc-20160816; b=d2bzvNs9cXF3NFqRVCxqLJ+X2lwy1p9D6vgWFkeN6XaoGBPh3elnWAOE0m9lVlMnwq 3axxJXFVztRi0I44jX7heu5j+QsdTCMTvhP3tlJrd3MC3MOjFWPutzIfYPgs8hhTosrP rHtUEz2xFmdSB86D7TDZh32kRUs8/ypp98ewE/dN1v7s8Xe/44IlFMWZbwShvUrh6xox /KpfZ2xPUMlvpzrmqsRSSxBR5en8bmZ7X6s8+Seqd4/Nh5h52lXELIbmAADx1YEUed07 JIbCRDAymyUSC2p1xTzpeNx4QnFOgIEPYB7k/It6I0TXkMyoHdbreQs+jBsE7xOrueo1 6jRQ== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=eougcXbfRbP8G5EQRNe/i4iJDcEF6YnBBiAKBEybOnM=; b=ZuyVUtM1zMfvm3L9Af7We8JDy1bCHdDFweQ3i2+vJBJfn/057Sey1GeCLhUz1TJI/w 8rDlljuUIm1s4iet94MkXas3i5whzPJxGuzfbgby0ZTKmHeAv3q4IvALYzjR1rtRNEty DH8SmHqCfK6jnShlespNEeKHp3LeacSvoSKHXVCg+ENV8+pSWL1GU+JzFMVcztfeFVXE zt7l+n0if/spa2tOqOja0o3FwBAkCDnIOrFPIe5RH4FudWLrAFwo+cvHj5vrbAKYJ5NI inXi6eFjvv9Mr+OVtozmdnvUnPMAs5D79/o160U/fLVpzQe6UevLm3rSo8DSJLRdp1Mz kXDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MIC4UmgF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u24si5075607pgj.489.2018.12.17.06.17.23; Mon, 17 Dec 2018 06:17:38 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=MIC4UmgF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732859AbeLQN6g (ORCPT + 99 others); Mon, 17 Dec 2018 08:58:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:57334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727651AbeLQN6g (ORCPT ); Mon, 17 Dec 2018 08:58:36 -0500 Received: from localhost (173-25-171-118.client.mchsi.com [173.25.171.118]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4B0282133F; Mon, 17 Dec 2018 13:58:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545055115; bh=fMAJHnfi5IG4Ruj4T3wXEl4IsIwZe6gAaTaAQFNacZ4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MIC4UmgFCJhAASGPwQ/R2JehEu2jCJ92mdSwyM6IM8o6/CSwqPcpfwolKflSUM0hk V88ifYAgrUgP1iIamyzKZt8igCCvW8aWslmUwQtH/eq9+OVHfES6DGsePBfPfcFI9m VsOaWTNvt0nsG/UvXozjweEkDCP05izvsR5TMcK0= Date: Mon, 17 Dec 2018 07:58:33 -0600 From: Bjorn Helgaas To: Andrey Smirnov Cc: Lorenzo Pieralisi , Fabio Estevam , Chris Healy , Lucas Stach , Leonard Crestez , "A.s. Dong" , Richard Zhu , linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 3/3] PCI: imx6: Make fallthrough comments more consistent Message-ID: <20181217135833.GJ20725@google.com> References: <20181216230916.22982-1-andrew.smirnov@gmail.com> <20181216230916.22982-4-andrew.smirnov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181216230916.22982-4-andrew.smirnov@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 16, 2018 at 03:09:16PM -0800, Andrey Smirnov wrote: > Convert all fallthrough comments to say "fall through", as well as > modify their placement to the point where the "break" would normally > be. > > Cc: Bjorn Helgaas > Cc: Fabio Estevam > Cc: Chris Healy > Cc: Lucas Stach > Cc: Leonard Crestez > Cc: "A.s. Dong" > Cc: Richard Zhu > Cc: linux-imx@nxp.com > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Cc: linux-pci@vger.kernel.org > Suggested-by: Bjorn Helgaas I didn't make it very clear, but my suggestion was really to remove the annotation completely; see below. > Signed-off-by: Andrey Smirnov > --- > drivers/pci/controller/dwc/pci-imx6.c | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c > index 59658577e81d..a0510e185d44 100644 > --- a/drivers/pci/controller/dwc/pci-imx6.c > +++ b/drivers/pci/controller/dwc/pci-imx6.c > @@ -362,7 +362,8 @@ static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie) > > switch (imx6_pcie->variant) { > case IMX7D: > - case IMX8MQ: /* FALLTHROUGH */ > + /* fall through */ > + case IMX8MQ: > reset_control_assert(imx6_pcie->pciephy_reset); > reset_control_assert(imx6_pcie->apps_reset); > break; IMO this use of "fall through" is superfluous and unusual in the Linux source. A "fall through" comment would be useful if the IMX7D case had executable code but no "break". Then the comment shows that the intent was to execute *both* the IMX7D code and the IMX8MQ code and the lack of a "break" was intentional. In this case, the intent is to treat IMX7D and IMX8MQ the same, and there's no executable code specifically for the IMX7D. I think it's easiest to read that when the list of identical cases is all together without the comment in the middle, i.e., as > case IMX7D: > case IMX8MQ: > reset_control_assert(imx6_pcie->pciephy_reset); rather than this: > case IMX7D: > /* fall through */ > case IMX8MQ: > reset_control_assert(imx6_pcie->pciephy_reset);