public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: freescale: pcie: fix building for x86_64 as a module
@ 2021-12-15 15:30 Marcel Ziswiler
  2021-12-16  6:35 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Marcel Ziswiler @ 2021-12-15 15:30 UTC (permalink / raw)
  To: linux-phy
  Cc: linux-imx, linux-next, Kishon Vijay Abraham I, Mark Brown,
	linux-pci, Tim Harvey, linux-kernel, Vinod Koul, linux-arm-kernel,
	Marcel Ziswiler, Fabio Estevam, Pengutronix Kernel Team,
	Richard Zhu, Sascha Hauer, Shawn Guo

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

x86_64 allmodconfig build failed like this:

/tmp/next/build/drivers/phy/freescale/phy-fsl-imx8m-pcie.c: In function
 'imx8_pcie_phy_init':
/tmp/next/build/drivers/phy/freescale/phy-fsl-imx8m-pcie.c:41:37:
 error: implicit declaration of function 'FIELD_PREP'
 [-Werror=implicit-function-declaration]
   41 | #define IMX8MM_GPR_PCIE_REF_CLK_EXT FIELD_PREP(IMX8MM_GPR_PCIE_
REF_CLK_SEL, 0x2)
      |                                     ^~~~~~~~~~
/tmp/next/build/drivers/phy/freescale/phy-fsl-imx8m-pcie.c:85:7: note:
 in expansion of macro 'IMX8MM_GPR_PCIE_REF_CLK_EXT'
   85 |       IMX8MM_GPR_PCIE_REF_CLK_EXT :
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Fix this by explicitly including linux/bitfield.h.

While at it sort includes alphabethically and add a new line before the
dt-bindings one as usually done.

Fixes: 1aa97b002258a190d77
("phy: freescale: pcie: Initialize the imx8 pcie standalone phy driver")
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

 drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c
index f6502463d49a..f1eb03ba25d6 100644
--- a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c
+++ b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c
@@ -3,10 +3,11 @@
  * Copyright 2021 NXP
  */
 
+#include <linux/bitfield.h>
 #include <linux/clk.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
-#include <linux/delay.h>
 #include <linux/mfd/syscon.h>
 #include <linux/mfd/syscon/imx7-iomuxc-gpr.h>
 #include <linux/module.h>
@@ -14,6 +15,7 @@
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/reset.h>
+
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 
 #define IMX8MM_PCIE_PHY_CMN_REG061	0x184
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-16  6:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-15 15:30 [PATCH] phy: freescale: pcie: fix building for x86_64 as a module Marcel Ziswiler
2021-12-16  6:35 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox