2022-01-24 19:06:42

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 0/2] 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(-)

--
2.25.1


2022-01-24 19:07:15

by Sergio Paracuellos

[permalink] [raw]
Subject: [PATCH 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]

Reported-by: kernel test robot <[email protected]>
Fixes: 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver")
Signed-off-by: Sergio Paracuellos <[email protected]>
---
drivers/pci/controller/pcie-mt7621.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
index 3824862ea144..f2e567282d3e 100644
--- a/drivers/pci/controller/pcie-mt7621.c
+++ b/drivers/pci/controller/pcie-mt7621.c
@@ -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);
--
2.25.1

2022-01-26 13:35:47

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings

On Mon, Jan 24, 2022 at 12:30:01PM +0100, Sergio Paracuellos wrote:
> 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(-)

Both applied to for-linus for v5.17, thank you!

2022-01-26 19:54:18

by Sergio Paracuellos

[permalink] [raw]
Subject: Re: [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings

On Wed, Jan 26, 2022 at 1:04 AM Bjorn Helgaas <[email protected]> wrote:
>
> On Mon, Jan 24, 2022 at 12:30:01PM +0100, Sergio Paracuellos wrote:
> > 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(-)
>
> Both applied to for-linus for v5.17, thank you!

Thanks for letting me know, Bjorn.

Best regards,
Sergio Paracuellos