* [PATCH] phy: qcom-uniphy: avoid build failure from duplicate PHY_TYPE_PCIE
@ 2026-11-24 10:59 Arnd Bergmann
2026-11-27 16:04 ` Manivannan Sadhasivam
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2026-11-24 10:59 UTC (permalink / raw)
To: Vinod Koul, Manivannan Sadhasivam, Thinh Nguyen,
Greg Kroah-Hartman, Krishna Kurapati
Cc: Arnd Bergmann, Neil Armstrong, Manivannan Sadhasivam, Kees Cook,
linux-arm-msm, linux-phy
From: Arnd Bergmann <arnd@arndb.de>
Both the DT-binding and the driver define a PHY_TYPE_PCIE constant,
which clashes at compile time:
In file included from include/linux/phy/phy.h:25,
from drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:15:
include/dt-bindings/phy/phy.h:15:33: error: expected identifier before numeric constant
15 | #define PHY_TYPE_PCIE 2
| ^
drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:47:9: note: in expansion of macro 'PHY_TYPE_PCIE'
47 | PHY_TYPE_PCIE = 1,
| ^~~~~~~~~~~~~
drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:127:27: error: 'PHY_TYPE_PCIE_GEN2' undeclared here (not in a function); did you mean 'PHY_TYPE_PCIE'?
127 | .phy_type = PHY_TYPE_PCIE_GEN2,
| ^~~~~~~~~~~~~~~~~~
| PHY_TYPE_PCIE
drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:135:27: error: 'PHY_TYPE_PCIE_GEN3' undeclared here (not in a function); did you mean 'PHY_TYPE_PCIE'?
135 | .phy_type = PHY_TYPE_PCIE_GEN3,
| ^~~~~~~~~~~~~~~~~~
| PHY_TYPE_PCIE
Nothing uses the definition in the driver, so just remove it.
Fixes: b28eecc89399 ("include: linux: phy: Add phy attribute "type" and associated helpers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c b/drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
index ef8709ff0e16..499ff3ce3b28 100644
--- a/drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
+++ b/drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
@@ -43,12 +43,6 @@
#define PHY_CFG_EIOS_DTCT_REG 0x3e4
#define PHY_CFG_GEN3_ALIGN_HOLDOFF_TIME 0x3e8
-enum qcom_uniphy_pcie_type {
- PHY_TYPE_PCIE = 1,
- PHY_TYPE_PCIE_GEN2,
- PHY_TYPE_PCIE_GEN3,
-};
-
struct qcom_uniphy_pcie_regs {
u32 offset;
u32 val;
@@ -56,7 +50,6 @@ struct qcom_uniphy_pcie_regs {
struct qcom_uniphy_pcie_data {
int lane_offset; /* offset between the lane register bases */
- u32 phy_type;
const struct qcom_uniphy_pcie_regs *init_seq;
u32 init_seq_num;
u32 pipe_clk_rate;
@@ -124,7 +117,6 @@ static const struct qcom_uniphy_pcie_regs ipq5332_regs[] = {
static const struct qcom_uniphy_pcie_data ipq5018_data = {
.lane_offset = 0x800,
- .phy_type = PHY_TYPE_PCIE_GEN2,
.init_seq = ipq5018_regs,
.init_seq_num = ARRAY_SIZE(ipq5018_regs),
.pipe_clk_rate = 125 * MEGA,
@@ -132,7 +124,6 @@ static const struct qcom_uniphy_pcie_data ipq5018_data = {
static const struct qcom_uniphy_pcie_data ipq5332_data = {
.lane_offset = 0x800,
- .phy_type = PHY_TYPE_PCIE_GEN3,
.init_seq = ipq5332_regs,
.init_seq_num = ARRAY_SIZE(ipq5332_regs),
.pipe_clk_rate = 250 * MEGA,
--
2.53.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] phy: qcom-uniphy: avoid build failure from duplicate PHY_TYPE_PCIE
2026-11-24 10:59 [PATCH] phy: qcom-uniphy: avoid build failure from duplicate PHY_TYPE_PCIE Arnd Bergmann
@ 2026-11-27 16:04 ` Manivannan Sadhasivam
2026-11-27 18:29 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Manivannan Sadhasivam @ 2026-11-27 16:04 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Vinod Koul, Manivannan Sadhasivam, Thinh Nguyen,
Greg Kroah-Hartman, Krishna Kurapati, Arnd Bergmann,
Neil Armstrong, Manivannan Sadhasivam, Kees Cook, linux-arm-msm,
linux-phy
On 2026-11-24 11:59 +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Both the DT-binding and the driver define a PHY_TYPE_PCIE constant,
> which clashes at compile time:
>
> In file included from include/linux/phy/phy.h:25,
> from drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:15:
> include/dt-bindings/phy/phy.h:15:33: error: expected identifier before numeric constant
> 15 | #define PHY_TYPE_PCIE 2
> | ^
> drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:47:9: note: in expansion of macro 'PHY_TYPE_PCIE'
> 47 | PHY_TYPE_PCIE = 1,
> | ^~~~~~~~~~~~~
> drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:127:27: error: 'PHY_TYPE_PCIE_GEN2' undeclared here (not in a function); did you mean 'PHY_TYPE_PCIE'?
> 127 | .phy_type = PHY_TYPE_PCIE_GEN2,
> | ^~~~~~~~~~~~~~~~~~
> | PHY_TYPE_PCIE
> drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:135:27: error: 'PHY_TYPE_PCIE_GEN3' undeclared here (not in a function); did you mean 'PHY_TYPE_PCIE'?
> 135 | .phy_type = PHY_TYPE_PCIE_GEN3,
> | ^~~~~~~~~~~~~~~~~~
> | PHY_TYPE_PCIE
>
> Nothing uses the definition in the driver, so just remove it.
>
> Fixes: b28eecc89399 ("include: linux: phy: Add phy attribute "type" and associated helpers")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
- Mani
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] phy: qcom-uniphy: avoid build failure from duplicate PHY_TYPE_PCIE
2026-11-27 16:04 ` Manivannan Sadhasivam
@ 2026-11-27 18:29 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2026-11-27 18:29 UTC (permalink / raw)
To: Manivannan Sadhasivam, Arnd Bergmann
Cc: Vinod Koul, Manivannan Sadhasivam, Thinh Nguyen,
Greg Kroah-Hartman, Krishna Kurapati, Neil Armstrong, Kees Cook,
linux-arm-msm, linux-phy, Sasha Levin
On Fri, Nov 27, 2026, at 17:04, Manivannan Sadhasivam wrote:
> On 2026-11-24 11:59 +0100, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> Both the DT-binding and the driver define a PHY_TYPE_PCIE constant,
>> which clashes at compile time:
>>
>> In file included from include/linux/phy/phy.h:25,
>> from drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:15:
>> include/dt-bindings/phy/phy.h:15:33: error: expected identifier before numeric constant
>> 15 | #define PHY_TYPE_PCIE 2
>> | ^
>> drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:47:9: note: in expansion of macro 'PHY_TYPE_PCIE'
>> 47 | PHY_TYPE_PCIE = 1,
>> | ^~~~~~~~~~~~~
>> drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:127:27: error: 'PHY_TYPE_PCIE_GEN2' undeclared here (not in a function); did you mean 'PHY_TYPE_PCIE'?
>> 127 | .phy_type = PHY_TYPE_PCIE_GEN2,
>> | ^~~~~~~~~~~~~~~~~~
>> | PHY_TYPE_PCIE
>> drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:135:27: error: 'PHY_TYPE_PCIE_GEN3' undeclared here (not in a function); did you mean 'PHY_TYPE_PCIE'?
>> 135 | .phy_type = PHY_TYPE_PCIE_GEN3,
>> | ^~~~~~~~~~~~~~~~~~
>> | PHY_TYPE_PCIE
>>
>> Nothing uses the definition in the driver, so just remove it.
>>
>> Fixes: b28eecc89399 ("include: linux: phy: Add phy attribute "type" and associated helpers")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
FWIW, this is already fixed in linux-next by 90d6263e867b ("phy: qcom:
uniphy-pcie-28lp: Rename the PHY type enum values"), which renames
the constants instead of removing them. I assume we'll leave it at that
version.
Arnd
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-27 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 10:59 [PATCH] phy: qcom-uniphy: avoid build failure from duplicate PHY_TYPE_PCIE Arnd Bergmann
2026-11-27 16:04 ` Manivannan Sadhasivam
2026-11-27 18:29 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox