Skip to contentSkip to conversation

ARM: imx6q: remove unused header includes

PATCH Applied Heiner Kallweit 3 participants 3 messages Sep 11 – Sep 30

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx6q: remove unused header includes

After 8392af7be78d ("ARM: imx6q: remove KSZ9021 PHY fixup") there's no user of phy.h and micrel_phy.h left.

---
 arch/arm/mach-imx/mach-imx6q.c | 2 --
 1 file changed, 2 deletions(-)
arch/arm/mach-imx/mach-imx6q.c +0 -2
index 58f53fba2..00ac52cf2 100644
@@ -8,9 +8,7 @@
 #include <linux/irqchip.h>
 #include <linux/of_platform.h>
 #include <linux/pci.h>
-#include <linux/phy.h>
 #include <linux/regmap.h>
-#include <linux/micrel_phy.h>
 #include <linux/mfd/syscon.h>
 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
 #include <asm/mach/arch.h>
Signature · 1 line
2.55.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Removing <linux/phy.h> and <linux/micrel_phy.h> causes a build failure because the prerequisite…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Removing <linux/phy.h> and <linux/micrel_phy.h> causes a build failure because the prerequisite commit 8392af7be78d is not present in the baseline, leaving PHY-related code intact. --

commit a97dbfcf09e3d32d8bf22f55a25ab0c09018688e
Author: Heiner Kallweit <[email protected]>

ARM: imx6q: remove unused header includes

This commit removes the includes for phy.h and micrel_phy.h in mach-imx6q.c. The commit message indicates these headers are no longer used after a prior commit.

arch/arm/mach-imx/mach-imx6q.c line 13

Quoted 11 lines
arch/arm/mach-imx/mach-imx6q.c +0 -2
index 7f62009257526..8aa76f42ab76e 100644
@@ -8,9 +8,7 @@
 #include <linux/irqchip.h>
 #include <linux/of_platform.h>
 #include <linux/pci.h>
-#include <linux/phy.h>
 #include <linux/regmap.h>
-#include <linux/micrel_phy.h>

[Severity: Low]
Does this removal cause a build failure in the current tree? It appears that the prerequisite commit 8392af7be78d is not present in this baseline, leaving PHY-related code intact.

For instance, ksz9021rn_phy_fixup() relies on struct phy_device, phy_write(), and MICREL_KSZ9021_EXTREG_CTRL defined in the removed headers:

arch/arm/mach-imx/mach-imx6q.c:ksz9021rn_phy_fixup() {
	if (IS_BUILTIN(CONFIG_PHYLIB)) {
		/* min rx data delay */
		phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL,
			0x8000 | MICREL_KSZ9021_RGMII_RX_DATA_PAD_SCEW);
		...
}

Additionally, imx6q_enet_phy_init() relies on phy_register_fixup_for_uid and PHY constants that are no longer included:

arch/arm/mach-imx/mach-imx6q.c:imx6q_enet_phy_init() {
	if (IS_BUILTIN(CONFIG_PHYLIB)) {
		phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
				ksz9021rn_phy_fixup);
	}
}

Removing these headers unconditionally triggers a compile time regression due to undeclared identifiers.

Quoted 3 lines
arch/arm/mach-imx/mach-imx6q.c +0 -0
 #include <linux/mfd/syscon.h>
 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
 #include <asm/mach/arch.h>
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#2 lore raw
In reply to Heiner Kallweit

From: Frank Li <[email protected]>

Quoted 2 lines · Heiner Kallweit

After 8392af7be78d ("ARM: imx6q: remove KSZ9021 PHY fixup") there's no user of phy.h and micrel_phy.h left.

Applied, thanks!

[1/1] ARM: imx6q: remove unused header includes

      commit: 1a0a1dbf72e7ef7a6abbe14987b249f0f7754aa2

I just sent out pull-request. I missed this patch. If there are chance to resend pull-request for 7.4, I will include this patch.

Best regards,
--
Frank Li <[email protected]>