Skip to content

Commit 4b77e4a

Browse files
parakabjorn-helgaas
authored andcommitted
PCI: mt7621: Drop of_match_ptr() to avoid unused variable
We have stubs for most OF interfaces even when CONFIG_OF is not set, so we allow building of pcie-mt7621.c in that case for compile testing. When CONFIG_OF is not set, "of_match_ptr(mt7621_pcie_ids)" compiles to NULL, which leaves mt7621_pcie_ids unused: $ make W=1 drivers/pci/controller/pcie-mt7621.c:549:34: warning: unused variable 'mt7621_pcie_ids' [-Wunused-const-variable] Drop of_match_ptr() to avoid the unused variable warning. [bhelgaas: commit log] Fixes: 2bdd523 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver") Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Reported-by: kernel test robot <[email protected]> Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent e783362 commit 4b77e4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/controller/pcie-mt7621.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ static struct platform_driver mt7621_pcie_driver = {
557557
.remove = mt7621_pcie_remove,
558558
.driver = {
559559
.name = "mt7621-pci",
560-
.of_match_table = of_match_ptr(mt7621_pcie_ids),
560+
.of_match_table = mt7621_pcie_ids,
561561
},
562562
};
563563
builtin_platform_driver(mt7621_pcie_driver);

0 commit comments

Comments
 (0)