Skip to contentSkip to conversation

phy: ralink: phy-mt7621-pci: drop 'of_match_ptr' to fix -Wunused-const-variable

PATCH Applied Sergio Paracuellos 2 participants 2 messages Jun 3, 2021

Subsystems (3)
lore
Share & tools
lore

Sergio Paracuellos

author maintainer
#0 lore raw

PATCH 1/1 phy: ralink: phy-mt7621-pci: drop 'of_match_ptr' to fix -Wunused-const-variable

The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF:

drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable]

---
 drivers/phy/ralink/phy-mt7621-pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/ralink/phy-mt7621-pci.c +1 -1
index 242c5d8b8635..5e6530f545b5 100644
@@ -348,7 +348,7 @@ static struct platform_driver mt7621_pci_phy_driver = {
 	.probe = mt7621_pci_phy_probe,
 	.driver = {
 		.name = "mt7621-pci-phy",
-		.of_match_table = of_match_ptr(mt7621_pci_phy_ids),
+		.of_match_table = mt7621_pci_phy_ids,
 	},
 };
 
Signature · 7 lines
2.25.1


-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
maintainer Applied
#1 lore raw
Quoted 3 lines · Sergio Paracuellos

The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF:

Applied, thanks

Signature · 6 lines
~Vinod

-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy