Skip to contentSkip to conversation

net: stmmac: qcom: drop of_match_ptr for ID table

PATCH Applied Krzysztof Kozlowski 3 participants 11 messages Mar 10, 2023 – Mar 15, 2023

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

PATCH 1/5 net: stmmac: qcom: drop of_match_ptr for ID table

The driver is specific to ARCH_QCOM which depends on OF thus the driver is OF-only. Its of_device_id table is built unconditionally, thus of_match_ptr() for ID table does not make sense.

---
 drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +1 -1
index 732774645c1a..32763566c214 100644
@@ -606,7 +606,7 @@ static struct platform_driver qcom_ethqos_driver = {
 	.driver = {
 		.name           = "qcom-ethqos",
 		.pm		= &stmmac_pltfr_pm_ops,
-		.of_match_table = of_match_ptr(qcom_ethqos_match),
+		.of_match_table = qcom_ethqos_match,
 	},
 };
 module_platform_driver(qcom_ethqos_driver);
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/5 net: stmmac: generic: drop of_match_ptr for ID table

The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here).

drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c:72:34: error: ‘dwmac_generic_match’ defined but not used [-Werror=unused-const-variable=]

---
 drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c +1 -1
index 5e731a72cce8..ef8f3a940938 100644
@@ -91,7 +91,7 @@ static struct platform_driver dwmac_generic_driver = {
 	.driver = {
 		.name           = STMMAC_RESOURCE_NAME,
 		.pm		= &stmmac_pltfr_pm_ops,
-		.of_match_table = of_match_ptr(dwmac_generic_match),
+		.of_match_table = dwmac_generic_match,
 	},
 };
 module_platform_driver(dwmac_generic_driver);
Signature · 1 line
2.34.1
Reviewed-by on v1 2/5
#2 lore raw

Re: [PATCH 2/5] net: stmmac: generic: drop of_match_ptr for ID table

Quoted 7 lines · Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here).

drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c:72:34: error: ‘dwmac_generic_match’ defined but not used [-Werror=unused-const-variable=]

#3 lore raw

PATCH 3/5 net: marvell: pxa168_eth: drop of_match_ptr for ID table

In reply to Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here).

drivers/net/ethernet/marvell/pxa168_eth.c:1575:34: error: ‘pxa168_eth_of_match’ defined but not used [-Werror=unused-const-variable=]

---
 drivers/net/ethernet/marvell/pxa168_eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/pxa168_eth.c +1 -1
index 87fff539d39d..d5691b6a2bc5 100644
@@ -1586,7 +1586,7 @@ static struct platform_driver pxa168_eth_driver = {
 	.suspend = pxa168_eth_suspend,
 	.driver = {
 		.name		= DRIVER_NAME,
-		.of_match_table	= of_match_ptr(pxa168_eth_of_match),
+		.of_match_table	= pxa168_eth_of_match,
 	},
 };
 
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by on v1 3/5
#4 lore raw

Re: [PATCH 3/5] net: marvell: pxa168_eth: drop of_match_ptr for ID table

Quoted 7 lines · Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here).

drivers/net/ethernet/marvell/pxa168_eth.c:1575:34: error: ‘pxa168_eth_of_match’ defined but not used [-Werror=unused-const-variable=]

#5 lore raw

PATCH 4/5 net: samsung: sxgbe: drop of_match_ptr for ID table

In reply to Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here).

drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:220:34: error: ‘sxgbe_dt_ids’ defined but not used [-Werror=unused-const-variable=]

---
 drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c +1 -1
index 926532466691..4e5526303f07 100644
@@ -229,7 +229,7 @@ static struct platform_driver sxgbe_platform_driver = {
 	.driver	= {
 		.name		= SXGBE_RESOURCE_NAME,
 		.pm		= &sxgbe_platform_pm_ops,
-		.of_match_table	= of_match_ptr(sxgbe_dt_ids),
+		.of_match_table	= sxgbe_dt_ids,
 	},
 };
 
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by on v1 4/5
#6 lore raw

Re: [PATCH 4/5] net: samsung: sxgbe: drop of_match_ptr for ID table

Quoted 7 lines · Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here).

drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:220:34: error: ‘sxgbe_dt_ids’ defined but not used [-Werror=unused-const-variable=]

#7 lore raw

PATCH 5/5 net: ni: drop of_match_ptr for ID table

In reply to Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here).

drivers/net/ethernet/ni/nixge.c:1253:34: error: ‘nixge_dt_ids’ defined but not used [-Werror=unused-const-variable=]

---
 drivers/net/ethernet/ni/nixge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/ni/nixge.c +1 -1
index 56e02cba0b8a..0fd156286d4d 100644
@@ -1422,7 +1422,7 @@ static struct platform_driver nixge_driver = {
 	.remove		= nixge_remove,
 	.driver		= {
 		.name		= "nixge",
-		.of_match_table	= of_match_ptr(nixge_dt_ids),
+		.of_match_table	= nixge_dt_ids,
 	},
 };
 module_platform_driver(nixge_driver);
Signature · 1 line
2.34.1
Reviewed-by on v1 5/5
#8 lore raw

Re: [PATCH 5/5] net: ni: drop of_match_ptr for ID table

Quoted 7 lines · Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here).

drivers/net/ethernet/ni/nixge.c:1253:34: error: ‘nixge_dt_ids’ defined but not used [-Werror=unused-const-variable=]

#10 lore raw
In reply to Krzysztof Kozlowski
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Quoted 8 lines · On Fri, 10 Mar 2023 22:46:28 +0100 you wrote:

The driver is specific to ARCH_QCOM which depends on OF thus the driver is OF-only. Its of_device_id table is built unconditionally, thus of_match_ptr() for ID table does not make sense.

---
 drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [1/5] net: stmmac: qcom: drop of_match_ptr for ID table

    https://git.kernel.org/netdev/net-next/c/dc54e450a5dd
  - [2/5] net: stmmac: generic: drop of_match_ptr for ID table
    https://git.kernel.org/netdev/net-next/c/e6512465838b
  - [3/5] net: marvell: pxa168_eth: drop of_match_ptr for ID table
    https://git.kernel.org/netdev/net-next/c/69df36d524db
  - [4/5] net: samsung: sxgbe: drop of_match_ptr for ID table
    https://git.kernel.org/netdev/net-next/c/7f319fe4363c
  - [5/5] net: ni: drop of_match_ptr for ID table
    https://git.kernel.org/netdev/net-next/c/7e9aa8cad084

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html