From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Bjorn Helgaas <helgaas@kernel.org>,
Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: linux-pci@vger.kernel.org, Fabio Estevam <fabio.estevam@nxp.com>,
cphealy@gmail.com, l.stach@pengutronix.de,
Leonard Crestez <leonard.crestez@nxp.com>,
"A.s. Dong" <aisheng.dong@nxp.com>,
Richard Zhu <hongxing.zhu@nxp.com>,
linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
Rob Herring <robh@kernel.org>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 3/3] PCI: imx: Add support for i.MX8MQ
Date: Fri, 14 Dec 2018 14:55:49 -0600 [thread overview]
Message-ID: <aacb613f-ad8b-8db9-1c63-a346ac62c772@embeddedor.com> (raw)
In-Reply-To: <20181214203042.GC20725@google.com>
Hi,
On 12/14/18 2:30 PM, Bjorn Helgaas wrote:
> [+cc Gustavo for fallthrough annotation]
>
>> @@ -301,6 +312,7 @@ static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie)
>>
>> switch (imx6_pcie->variant) {
>> case IMX7D:
>> + case IMX8MQ: /* FALLTHROUGH */
>> reset_control_assert(imx6_pcie->pciephy_reset);
>> reset_control_assert(imx6_pcie->apps_reset);
>> break;
>
> I'm not an expert on fallthrough annotation (Gustavo, cc'd, is), but
> this looks wrong. It's the IMX7D case that falls through, not the
> IMX8MQ case.
>
Correct.
> The recent annotations added by Gustavo are at the point where the
> "break" would normally be, e.g.,
>
> case IMX7D:
> /* fall through */ <--- annotation
> case IMX8MQ:
> <code>
> break;
>
> But in this case there's actually no IMX7D-specific *code* there, so I
> suspect the annotation is unnecessary. It's obvious that IMX7D and
> IMX8MQ are handled the same, so there's really no opportunity for the
> "forgotten break" mistake -Wimplicit-fallthrough is trying to find.
>
Yep. That's correct. There is no need for those annotations in this patch.
> If we *do* want this annotation, we should spell it the same as
> Gustavo has been, i.e., "fall through".
>
This is a matter of style. For -Wimplicit-fallthrough, "FALLTHROUGH" is
as valid a "fall through".
Although, currently, there are 1997 instances of "fall through" vs 235
of "FALLTHROUGH" in linux-next.
Thanks
--
Gustavo
next prev parent reply other threads:[~2018-12-14 20:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 7:35 [PATCH v2 0/3] PCIE support for i.MX8MQ Andrey Smirnov
2018-12-06 7:35 ` [PATCH v2 1/3] PCI: imx: No-op imx6_setup_phy_mpll() on i.MX7D Andrey Smirnov
2018-12-06 9:41 ` Lucas Stach
2018-12-06 7:35 ` [PATCH v2 2/3] PCI: imx: No-op imx6_pcie_reset_phy() " Andrey Smirnov
2018-12-06 9:41 ` Lucas Stach
2018-12-06 7:35 ` [PATCH v2 3/3] PCI: imx: Add support for i.MX8MQ Andrey Smirnov
2018-12-06 10:23 ` Lucas Stach
2018-12-14 20:30 ` Bjorn Helgaas
2018-12-14 20:55 ` Gustavo A. R. Silva [this message]
2018-12-15 5:22 ` Andrey Smirnov
2018-12-06 12:15 ` [PATCH v2 0/3] PCIE " Lorenzo Pieralisi
2018-12-07 2:44 ` Andrey Smirnov
2018-12-14 20:38 ` Bjorn Helgaas
2018-12-15 5:25 ` Andrey Smirnov
2018-12-17 10:12 ` Lucas Stach
2018-12-17 10:26 ` Lorenzo Pieralisi
2018-12-17 11:11 ` Lorenzo Pieralisi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aacb613f-ad8b-8db9-1c63-a346ac62c772@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=aisheng.dong@nxp.com \
--cc=andrew.smirnov@gmail.com \
--cc=cphealy@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=fabio.estevam@nxp.com \
--cc=helgaas@kernel.org \
--cc=hongxing.zhu@nxp.com \
--cc=l.stach@pengutronix.de \
--cc=leonard.crestez@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).