PCI: imx6: Use fallthrough pseudo-keyword
Subsystems (4)
PATCH 1/1 PCI: imx6: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case.
--- drivers/pci/controller/dwc/pci-imx6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pci/controller/dwc/pci-imx6.c +3 -3
@@ -439,7 +439,7 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie *imx6_pcie)regmap_update_bits (imx6_pcie->iomuxc_gpr,IOMUXC_GPR12 ,IMX6SX_GPR12_PCIE_TEST_POWERDOWN ,0 );break ; -case IMX6QP :/* FALLTHROUGH */ +case IMX6QP :case IMX6Q :/* power up core phy and enable ref clock */ regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1,
@@ -642,7 +642,7 @@ static void imx6_pcie_init_phy(struct imx6_pcie *imx6_pcie)regmap_update_bits (imx6_pcie->iomuxc_gpr,IOMUXC_GPR12 ,IMX6SX_GPR12_PCIE_RX_EQ_MASK ,IMX6SX_GPR12_PCIE_RX_EQ_2 ); -/* FALLTHROUGH */ + fallthrough;default :regmap_update_bits (imx6_pcie->iomuxc_gpr,IOMUXC_GPR12 ,IMX6Q_GPR12_PCIE_CTL_2 ,0 <<10 );
@@ -1107,7 +1107,7 @@ static int imx6_pcie_probe(struct platform_device *pdev)dev_err (dev,"pcie_aux clock source missing or invalid\n" );return PTR_ERR (imx6_pcie->pcie_aux); } -/* fall through */ + fallthrough;case IMX7D :if (dbi_base->start ==IMX8MQ_PCIE2_BASE_ADDR ) imx6_pcie->controller_id =1 ;
Signature · 1 line
2.27.0
Quoted 5 lines · Gustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case.
Hi Gustavo,
I'm certainly fine with these patches, and thanks for doing them!
And thanks for providing a link to the rationale. But the URL contains "latest", so I think it may break if deprecated.rst or the section is ever renamed.
I think I would prefer if we could reference the current text, e.g., via
https://www.kernel.org/doc/html/v5.7-rc7/process/deprecated.html#implicit-switch-case-fall-through
(The v5.7 doc would be better but doesn't seem to be generated yet; I pinged the helpdesk about that.)
Or we could refer to b9918bdcac1f ("Documentation/process: Add fallthrough pseudo-keyword"), although it's not nearly as pretty as the HTML.
Quoted 39 lines
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/pci/controller/dwc/pci-imx6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/pci/controller/dwc/pci-imx6.c +3
-3@@ -439,7 +439,7 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie *imx6_pcie)regmap_update_bits (imx6_pcie->iomuxc_gpr,IOMUXC_GPR12 ,IMX6SX_GPR12_PCIE_TEST_POWERDOWN ,0 );break ; -case IMX6QP :/* FALLTHROUGH */ +case IMX6QP :case IMX6Q :/* power up core phy and enable ref clock */ regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1,@@ -642,7 +642,7 @@ static void imx6_pcie_init_phy(struct imx6_pcie *imx6_pcie)regmap_update_bits (imx6_pcie->iomuxc_gpr,IOMUXC_GPR12 ,IMX6SX_GPR12_PCIE_RX_EQ_MASK ,IMX6SX_GPR12_PCIE_RX_EQ_2 ); -/* FALLTHROUGH */ + fallthrough;default :regmap_update_bits (imx6_pcie->iomuxc_gpr,IOMUXC_GPR12 ,IMX6Q_GPR12_PCIE_CTL_2 ,0 <<10 );@@ -1107,7 +1107,7 @@ static int imx6_pcie_probe(struct platform_device *pdev)dev_err (dev,"pcie_aux clock source missing or invalid\n" );return PTR_ERR (imx6_pcie->pcie_aux); } -/* fall through */ + fallthrough;case IMX7D :if (dbi_base->start ==IMX8MQ_PCIE2_BASE_ADDR ) imx6_pcie->controller_id =1 ;Signature · 1 line
2.27.0
Hi Bjorn,
Quoted 11 lines · Bjorn Helgaas
Quoted 5 lines · Gustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case.
Hi Gustavo,
I'm certainly fine with these patches, and thanks for doing them!
Quoted 9 lines
And thanks for providing a link to the rationale. But the URL contains "latest", so I think it may break if
deprecated.rstor the section is ever renamed.I think I would prefer if we could reference the current text, e.g., via
https://www.kernel.org/doc/html/v5.7-rc7/process/deprecated.html#implicit-switch-case-fall-through
I already sent v2 with a URL to proper documentation for Linux v5.7:
https://lore.kernel.org/lkml/20200722031903.GA3711@embeddedor/
Quoted 3 lines
(The v5.7 doc would be better but doesn't seem to be generated yet; I pinged the helpdesk about that.)
Thanks for doing that. I wasn't aware that one could ask helpdesk about this.
--
Gustavo
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel