PCI: mt7621: address some kernel test robot reported warnings
Subsystems (4)
Sergio Paracuellos
maintainercover PCI: mt7621: address some kernel test robot reported warnings
Kernel test robot complains about two things here[0]:
- pcie_rmw() [-Wunused-function]
- 'mt7621_pcie_ids' [-Wunused-const-variable]
Address this two warnings in this small two patches.
Best regards,
Sergio Paracuellos
[0]: https://lkml.org/lkml/2022/1/24/264
Sergio Paracuellos (2):
PCI: mt7621: drop 'of_match_ptr' to fix -Wunused-const-variable
PCI: mt7621: remove unused function pcie_rmw()
drivers/pci/controller/pcie-mt7621.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
Signature · 1 line
2.25.1
Sergio Paracuellos
maintainerPATCH 1/2 PCI: mt7621: drop 'of_match_ptr' to fix -Wunused-const-variable
The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF:
drivers/pci/controller/pcie-mt7621.c:549:34: warning: unused variable 'mt7621_pcie_ids' [-Wunused-const-variable]
--- drivers/pci/controller/pcie-mt7621.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/pcie-mt7621.c +1 -1
@@ -557,7 +557,7 @@ static struct platform_driver mt7621_pcie_driver = { .remove = mt7621_pcie_remove, .driver = { .name = "mt7621-pci", - .of_match_table = of_match_ptr(mt7621_pcie_ids), + .of_match_table = mt7621_pcie_ids, }, };builtin_platform_driver (mt7621_pcie_driver);
Signature · 1 line
2.25.1
Sergio Paracuellos
maintainerPATCH 2/2 PCI: mt7621: remove unused function pcie_rmw()
In reply to Sergio ParacuellosFunction pcie_rmw() is not being used at all and be deleted. Hence get rid of it. This fix the following complain warning:
drivers/pci/controller/pcie-mt7621.c:112:20: warning: unused function 'pcie_rmw' [-Wunused-function]
--- drivers/pci/controller/pcie-mt7621.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/pci/controller/pcie-mt7621.c +0 -9
@@ -109,15 +109,6 @@ static inline void pcie_write(struct mt7621_pcie *pcie, u32 val, u32 reg)writel_relaxed (val, pcie->base + reg); } -static inline void pcie_rmw (struct mt7621_pcie *pcie,u32 reg,u32 clr,u32 set) -{ -u32 val =readl_relaxed (pcie->base + reg); - - val &= ~clr; - val |= set; -writel_relaxed (val, pcie->base + reg); -} -static inline u32 pcie_port_read (struct mt7621_pcie_port *port,u32 reg) {return readl_relaxed (port->base + reg);
Signature · 1 line
2.25.1
Quoted 9 lines · Sergio Paracuellos
Kernel test robot complains about two things here[0]:
-pcie_rmw()[-Wunused-function]
- 'mt7621_pcie_ids' [-Wunused-const-variable]Address this two warnings in this small two patches.
Best regards,
Sergio Paracuellos
Quoted 8 lines
[0]: https://lkml.org/lkml/2022/1/24/264
Sergio Paracuellos (2):
PCI: mt7621: drop 'of_match_ptr' to fix -Wunused-const-variable
PCI: mt7621: remove unused functionpcie_rmw()drivers/pci/controller/pcie-mt7621.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
Both applied to for-linus for v5.17, thank you!
Sergio Paracuellos
maintainerQuoted 13 lines · Bjorn Helgaas
Quoted 11 lines · Sergio Paracuellos
Kernel test robot complains about two things here[0]:
-pcie_rmw()[-Wunused-function]
- 'mt7621_pcie_ids' [-Wunused-const-variable]Address this two warnings in this small two patches.
Best regards,
Sergio Paracuellos
Quoted 8 lines
Quoted 6 lines
Sergio Paracuellos (2):
PCI: mt7621: drop 'of_match_ptr' to fix -Wunused-const-variable
PCI: mt7621: remove unused functionpcie_rmw()drivers/pci/controller/pcie-mt7621.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)Both applied to for-linus for v5.17, thank you!
Thanks for letting me know, Bjorn.
Best regards,
Sergio Paracuellos