Re: linux-next: build failure after merge of the phy-next tree

From: Vinod Koul
Date: Mon Feb 13 2023 - 00:17:15 EST


On 13-02-23, 13:55, Stephen Rothwell wrote:
> Hi all,
>
> After merging the phy-next tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/phy/qualcomm/phy-qcom-snps-eusb2.c: In function 'qcom_snps_eusb2_hsphy_write_mask':
> drivers/phy/qualcomm/phy-qcom-snps-eusb2.c:147:15: error: implicit declaration of function 'readl_relaxed' [-Werror=implicit-function-declaration]
> 147 | reg = readl_relaxed(base + offset);
> | ^~~~~~~~~~~~~
> drivers/phy/qualcomm/phy-qcom-snps-eusb2.c:150:9: error: implicit declaration of function 'writel_relaxed' [-Werror=implicit-function-declaration]
> 150 | writel_relaxed(reg, base + offset);
> | ^~~~~~~~~~~~~~
> drivers/phy/qualcomm/phy-qcom-snps-eusb2.c: In function 'qcom_eusb2_default_parameters':
> drivers/phy/qualcomm/phy-qcom-snps-eusb2.c:161:42: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
> 161 | FIELD_PREP(PHY_CFG_TX_PREEMP_TUNE_MASK, 0));
> | ^~~~~~~~~~
> cc1: all warnings being treated as errors
>
> Caused by commit
>
> 80090810f5d3 ("phy: qcom: Add QCOM SNPS eUSB2 driver")

Thanks Stephen for the report, I have fixed it up by adding the missing
headers:

-- >8 --

From: Vinod Koul <vkoul@xxxxxxxxxx>
Date: Mon, 13 Feb 2023 10:39:26 +0530
Subject: [PATCH] phy: qcom: snps-eusb2: Add missing headers

The driver was missing to include couple of headers explictly which
causes build to fail on other archs

Fix this by adding bitfield.h and iopoll.h explictly

Fixes: 80090810f5d3 ("phy: qcom: Add QCOM SNPS eUSB2 driver")
Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
---
drivers/phy/qualcomm/phy-qcom-snps-eusb2.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-snps-eusb2.c b/drivers/phy/qualcomm/phy-qcom-snps-eusb2.c
index 40a421cf3dd9..64e835b7ef53 100644
--- a/drivers/phy/qualcomm/phy-qcom-snps-eusb2.c
+++ b/drivers/phy/qualcomm/phy-qcom-snps-eusb2.c
@@ -3,8 +3,10 @@
* Copyright (c) 2023, Linaro Limited
*/

+#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/delay.h>
+#include <linux/iopoll.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
--
2.39.0

--
~Vinod