Skip to content

Commit d2ca43f

Browse files
robherringdavem330
authored andcommitted
net: xgene: Fix unused xgene_enet_of_match warning for !CONFIG_OF
Commit b037711 ("net: ethernet: Use device_get_match_data()") dropped the unconditional use of xgene_enet_of_match resulting in this warning: drivers/net/ethernet/apm/xgene/xgene_enet_main.c:2004:34: warning: unused variable 'xgene_enet_of_match' [-Wunused-const-variable] The fix is to drop of_match_ptr() which is not necessary because DT is always used for this driver (well, it could in theory support ACPI only, but CONFIG_OF is always enabled for arm64). Fixes: b037711 ("net: ethernet: Use device_get_match_data()") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Rob Herring <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 068d8b7 commit d2ca43f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/apm/xgene/xgene_enet_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,7 @@ static void xgene_enet_shutdown(struct platform_device *pdev)
21702170
static struct platform_driver xgene_enet_driver = {
21712171
.driver = {
21722172
.name = "xgene-enet",
2173-
.of_match_table = of_match_ptr(xgene_enet_of_match),
2173+
.of_match_table = xgene_enet_of_match,
21742174
.acpi_match_table = ACPI_PTR(xgene_enet_acpi_match),
21752175
},
21762176
.probe = xgene_enet_probe,

0 commit comments

Comments
 (0)