]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net: mdio: xgene: Fix unused xgene_mdio_of_match warning for !CONFIG_OF
authorRob Herring <robh@kernel.org>
Thu, 19 Oct 2023 18:23:45 +0000 (13:23 -0500)
committerJakub Kicinski <kuba@kernel.org>
Mon, 23 Oct 2023 17:16:47 +0000 (10:16 -0700)
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>
drivers/net/mdio/mdio-xgene.c

index 495fbe35b6ce20827c25b98b1bc07e0aabc0fff6..2772a309854369f6838d4e6fa00edd6dca4000e3 100644 (file)
@@ -437,7 +437,7 @@ static void xgene_mdio_remove(struct platform_device *pdev)
 static struct platform_driver xgene_mdio_driver = {
        .driver = {
                .name = "xgene-mdio",
-               .of_match_table = of_match_ptr(xgene_mdio_of_match),
+               .of_match_table = xgene_mdio_of_match,
                .acpi_match_table = ACPI_PTR(xgene_mdio_acpi_match),
        },
        .probe = xgene_mdio_probe,