ramips: 6.1: copy config and patches
[openwrt/staging/jow.git] / target / linux / ramips / patches-6.1 / 104-v5.17-PCI-mt7621-Drop-of_match_ptr-to-avoid-unused-variabl.patch
1 From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
2 Date: Mon, 24 Jan 2022 12:30:02 +0100
3 Subject: [PATCH] PCI: mt7621: Drop of_match_ptr() to avoid unused variable
4
5 We have stubs for most OF interfaces even when CONFIG_OF is not set, so we
6 allow building of pcie-mt7621.c in that case for compile testing.
7
8 When CONFIG_OF is not set, "of_match_ptr(mt7621_pcie_ids)" compiles to
9 NULL, which leaves mt7621_pcie_ids unused:
10
11 $ make W=1
12 drivers/pci/controller/pcie-mt7621.c:549:34: warning: unused variable 'mt7621_pcie_ids' [-Wunused-const-variable]
13
14 Drop of_match_ptr() to avoid the unused variable warning.
15
16 [bhelgaas: commit log]
17 Fixes: 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver")
18 Link: https://lore.kernel.org/r/20220124113003.406224-2-sergio.paracuellos@gmail.com
19 Link: https://lore.kernel.org/r/202201241754.igtHzgHv-lkp@intel.com
20 Reported-by: kernel test robot <lkp@intel.com>
21 Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
22 Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
23 ---
24
25 --- a/drivers/pci/controller/pcie-mt7621.c
26 +++ b/drivers/pci/controller/pcie-mt7621.c
27 @@ -557,7 +557,7 @@ static struct platform_driver mt7621_pci
28 .remove = mt7621_pcie_remove,
29 .driver = {
30 .name = "mt7621-pci",
31 - .of_match_table = of_match_ptr(mt7621_pcie_ids),
32 + .of_match_table = mt7621_pcie_ids,
33 },
34 };
35 builtin_platform_driver(mt7621_pcie_driver);