Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: mdio: xgene: Fix unused xgene_mdio_of_match warning for !CONFIG_OF

Commit a243ecc323b9 ("net: mdio: xgene: Use device_get_match_data()")
dropped the unconditional use of xgene_mdio_of_match resulting in this
warning:

drivers/net/mdio/mdio-xgene.c:303:34: warning: unused variable 'xgene_mdio_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: a243ecc323b9 ("net: mdio: xgene: Use device_get_match_data()")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310170832.xnVXw1bb-lkp@intel.com/
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231019182345.833136-1-robh@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Rob Herring and committed by
Jakub Kicinski
d6e48462 c0119e62

+1 -1
+1 -1
drivers/net/mdio/mdio-xgene.c
··· 437 437 static struct platform_driver xgene_mdio_driver = { 438 438 .driver = { 439 439 .name = "xgene-mdio", 440 - .of_match_table = of_match_ptr(xgene_mdio_of_match), 440 + .of_match_table = xgene_mdio_of_match, 441 441 .acpi_match_table = ACPI_PTR(xgene_mdio_acpi_match), 442 442 }, 443 443 .probe = xgene_mdio_probe,