Skip to content

Commit 8610e98

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. See also 1dff012 ("PCI: Drop of_match_ptr() to avoid unused variables"). Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 277004d commit 8610e98

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/pci/controller/pci-ftpci100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ static const struct of_device_id faraday_pci_of_match[] = {
553553
static struct platform_driver faraday_pci_driver = {
554554
.driver = {
555555
.name = "ftpci100",
556-
.of_match_table = of_match_ptr(faraday_pci_of_match),
556+
.of_match_table = faraday_pci_of_match,
557557
.suppress_bind_attrs = true,
558558
},
559559
.probe = faraday_pci_probe,

drivers/pci/controller/pci-v3-semi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ static const struct of_device_id v3_pci_of_match[] = {
901901
static struct platform_driver v3_pci_driver = {
902902
.driver = {
903903
.name = "pci-v3-semi",
904-
.of_match_table = of_match_ptr(v3_pci_of_match),
904+
.of_match_table = v3_pci_of_match,
905905
.suppress_bind_attrs = true,
906906
},
907907
.probe = v3_pci_probe,

0 commit comments

Comments
 (0)