linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Ziswiler <marcel@ziswiler.com>
To: linux-phy@lists.infradead.org
Cc: linux-imx@nxp.com, linux-next@vger.kernel.org,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Mark Brown <broonie@kernel.org>,
	linux-pci@vger.kernel.org, Tim Harvey <tharvey@gateworks.com>,
	linux-kernel@vger.kernel.org, Vinod Koul <vkoul@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Fabio Estevam <festevam@gmail.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Richard Zhu <hongxing.zhu@nxp.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>
Subject: [PATCH] phy: freescale: pcie: fix building for x86_64 as a module
Date: Wed, 15 Dec 2021 16:30:36 +0100	[thread overview]
Message-ID: <20211215153037.688885-1-marcel@ziswiler.com> (raw)

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


             reply	other threads:[~2021-12-15 16:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 15:30 Marcel Ziswiler [this message]
2021-12-16  6:35 ` [PATCH] phy: freescale: pcie: fix building for x86_64 as a module Vinod Koul

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=20211215153037.688885-1-marcel@ziswiler.com \
    --to=marcel@ziswiler.com \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=hongxing.zhu@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=tharvey@gateworks.com \
    --cc=vkoul@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).