Skip to content

Commit 1dff012

Browse files
committed
PCI: Drop of_match_ptr() to avoid unused variables
We have stubs for most OF interfaces even when CONFIG_OF is not set, so we allow building of most controller drivers in that case for compile testing. When CONFIG_OF is not set, "of_match_ptr(<match_table>)" compiles to NULL, which leaves <match_table> unused, resulting in errors like this: $ make W=1 drivers/pci/controller/pci-xgene.c:636:34: error: ‘xgene_pcie_match_table’ defined but not used [-Werror=unused-const-variable=] Drop of_match_ptr() to avoid the unused variable warning. Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent f2906aa commit 1dff012

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

drivers/pci/controller/dwc/pci-keystone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ static struct platform_driver ks_pcie_driver __refdata = {
13241324
.remove = __exit_p(ks_pcie_remove),
13251325
.driver = {
13261326
.name = "keystone-pcie",
1327-
.of_match_table = of_match_ptr(ks_pcie_of_match),
1327+
.of_match_table = ks_pcie_of_match,
13281328
},
13291329
};
13301330
builtin_platform_driver(ks_pcie_driver);

drivers/pci/controller/dwc/pcie-armada8k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static struct platform_driver armada8k_pcie_driver = {
343343
.probe = armada8k_pcie_probe,
344344
.driver = {
345345
.name = "armada8k-pcie",
346-
.of_match_table = of_match_ptr(armada8k_pcie_of_match),
346+
.of_match_table = armada8k_pcie_of_match,
347347
.suppress_bind_attrs = true,
348348
},
349349
};

drivers/pci/controller/dwc/pcie-spear13xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ static struct platform_driver spear13xx_pcie_driver = {
258258
.probe = spear13xx_pcie_probe,
259259
.driver = {
260260
.name = "spear-pcie",
261-
.of_match_table = of_match_ptr(spear13xx_pcie_of_match),
261+
.of_match_table = spear13xx_pcie_of_match,
262262
.suppress_bind_attrs = true,
263263
},
264264
};

drivers/pci/controller/pci-xgene.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ static const struct of_device_id xgene_pcie_match_table[] = {
641641
static struct platform_driver xgene_pcie_driver = {
642642
.driver = {
643643
.name = "xgene-pcie",
644-
.of_match_table = of_match_ptr(xgene_pcie_match_table),
644+
.of_match_table = xgene_pcie_match_table,
645645
.suppress_bind_attrs = true,
646646
},
647647
.probe = xgene_pcie_probe,

0 commit comments

Comments
 (0)