linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings
@ 2022-01-24 11:30 Sergio Paracuellos
  2022-01-24 11:30 ` [PATCH 1/2] PCI: mt7621: drop 'of_match_ptr' to fix -Wunused-const-variable Sergio Paracuellos
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2022-01-24 11:30 UTC (permalink / raw)
  To: linux-pci; +Cc: lorenzo.pieralisi, bhelgaas, linux-kernel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] PCI: mt7621: drop 'of_match_ptr' to fix -Wunused-const-variable
  2022-01-24 11:30 [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings Sergio Paracuellos
@ 2022-01-24 11:30 ` Sergio Paracuellos
  2022-01-24 11:30 ` [PATCH 2/2] PCI: mt7621: remove unused function pcie_rmw() Sergio Paracuellos
  2022-01-26  0:04 ` [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings Bjorn Helgaas
  2 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2022-01-24 11:30 UTC (permalink / raw)
  To: linux-pci; +Cc: lorenzo.pieralisi, bhelgaas, linux-kernel, kernel test robot

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 <lkp@intel.com>
Fixes: 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver")
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] PCI: mt7621: remove unused function pcie_rmw()
  2022-01-24 11:30 [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings Sergio Paracuellos
  2022-01-24 11:30 ` [PATCH 1/2] PCI: mt7621: drop 'of_match_ptr' to fix -Wunused-const-variable Sergio Paracuellos
@ 2022-01-24 11:30 ` Sergio Paracuellos
  2022-01-26  0:04 ` [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings Bjorn Helgaas
  2 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2022-01-24 11:30 UTC (permalink / raw)
  To: linux-pci; +Cc: lorenzo.pieralisi, bhelgaas, linux-kernel, kernel test robot

Function 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]

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver")
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/pci/controller/pcie-mt7621.c | 9 ---------
 1 file changed, 9 deletions(-)

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings
  2022-01-24 11:30 [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings Sergio Paracuellos
  2022-01-24 11:30 ` [PATCH 1/2] PCI: mt7621: drop 'of_match_ptr' to fix -Wunused-const-variable Sergio Paracuellos
  2022-01-24 11:30 ` [PATCH 2/2] PCI: mt7621: remove unused function pcie_rmw() Sergio Paracuellos
@ 2022-01-26  0:04 ` Bjorn Helgaas
  2022-01-26  6:12   ` Sergio Paracuellos
  2 siblings, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2022-01-26  0:04 UTC (permalink / raw)
  To: Sergio Paracuellos; +Cc: linux-pci, lorenzo.pieralisi, bhelgaas, linux-kernel

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!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings
  2022-01-26  0:04 ` [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings Bjorn Helgaas
@ 2022-01-26  6:12   ` Sergio Paracuellos
  0 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2022-01-26  6:12 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, Lorenzo Pieralisi, Bjorn Helgaas, linux-kernel

On Wed, Jan 26, 2022 at 1:04 AM Bjorn Helgaas <helgaas@kernel.org> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-26  6:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 11:30 [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings Sergio Paracuellos
2022-01-24 11:30 ` [PATCH 1/2] PCI: mt7621: drop 'of_match_ptr' to fix -Wunused-const-variable Sergio Paracuellos
2022-01-24 11:30 ` [PATCH 2/2] PCI: mt7621: remove unused function pcie_rmw() Sergio Paracuellos
2022-01-26  0:04 ` [PATCH 0/2] PCI: mt7621: address some kernel test robot reported warnings Bjorn Helgaas
2022-01-26  6:12   ` Sergio Paracuellos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).