linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] PCI: microchip: Make some symbols static
@ 2021-03-08  9:48 'Wei Yongjun
  2021-03-08 12:41 ` Krzysztof Wilczyński
  2021-03-22 14:24 ` Lorenzo Pieralisi
  0 siblings, 2 replies; 3+ messages in thread
From: 'Wei Yongjun @ 2021-03-08  9:48 UTC (permalink / raw)
  To: weiyongjun1, Daire McNamara, Lorenzo Pieralisi, Bjorn Helgaas
  Cc: linux-pci, kernel-janitors, Hulk Robot

From: Wei Yongjun <weiyongjun1@huawei.com>

The sparse tool complains as follows:

drivers/pci/controller/pcie-microchip-host.c:304:18: warning:
 symbol 'pcie_event_to_event' was not declared. Should it be static?
drivers/pci/controller/pcie-microchip-host.c:310:18: warning:
 symbol 'sec_error_to_event' was not declared. Should it be static?
drivers/pci/controller/pcie-microchip-host.c:317:18: warning:
 symbol 'ded_error_to_event' was not declared. Should it be static?
drivers/pci/controller/pcie-microchip-host.c:324:18: warning:
 symbol 'local_status_to_event' was not declared. Should it be static?

Those symbols are not used outside of pcie-microchip-host.c, so this
commit marks them static.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/pci/controller/pcie-microchip-host.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/pcie-microchip-host.c b/drivers/pci/controller/pcie-microchip-host.c
index 04c19ff81aff..132631cfe4b6 100644
--- a/drivers/pci/controller/pcie-microchip-host.c
+++ b/drivers/pci/controller/pcie-microchip-host.c
@@ -301,27 +301,27 @@ static const struct cause event_cause[NUM_EVENTS] = {
 	LOCAL_EVENT_CAUSE(PM_MSI_INT_SYS_ERR, "system error"),
 };
 
-struct event_map pcie_event_to_event[] = {
+static struct event_map pcie_event_to_event[] = {
 	PCIE_EVENT_TO_EVENT_MAP(L2_EXIT),
 	PCIE_EVENT_TO_EVENT_MAP(HOTRST_EXIT),
 	PCIE_EVENT_TO_EVENT_MAP(DLUP_EXIT),
 };
 
-struct event_map sec_error_to_event[] = {
+static struct event_map sec_error_to_event[] = {
 	SEC_ERROR_TO_EVENT_MAP(TX_RAM_SEC_ERR),
 	SEC_ERROR_TO_EVENT_MAP(RX_RAM_SEC_ERR),
 	SEC_ERROR_TO_EVENT_MAP(PCIE2AXI_RAM_SEC_ERR),
 	SEC_ERROR_TO_EVENT_MAP(AXI2PCIE_RAM_SEC_ERR),
 };
 
-struct event_map ded_error_to_event[] = {
+static struct event_map ded_error_to_event[] = {
 	DED_ERROR_TO_EVENT_MAP(TX_RAM_DED_ERR),
 	DED_ERROR_TO_EVENT_MAP(RX_RAM_DED_ERR),
 	DED_ERROR_TO_EVENT_MAP(PCIE2AXI_RAM_DED_ERR),
 	DED_ERROR_TO_EVENT_MAP(AXI2PCIE_RAM_DED_ERR),
 };
 
-struct event_map local_status_to_event[] = {
+static struct event_map local_status_to_event[] = {
 	LOCAL_STATUS_TO_EVENT_MAP(DMA_END_ENGINE_0),
 	LOCAL_STATUS_TO_EVENT_MAP(DMA_END_ENGINE_1),
 	LOCAL_STATUS_TO_EVENT_MAP(DMA_ERROR_ENGINE_0),


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

* Re: [PATCH -next] PCI: microchip: Make some symbols static
  2021-03-08  9:48 [PATCH -next] PCI: microchip: Make some symbols static 'Wei Yongjun
@ 2021-03-08 12:41 ` Krzysztof Wilczyński
  2021-03-22 14:24 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Wilczyński @ 2021-03-08 12:41 UTC (permalink / raw)
  To: 'Wei Yongjun
  Cc: Daire McNamara, Lorenzo Pieralisi, Bjorn Helgaas, linux-pci,
	kernel-janitors, Hulk Robot

Hi,

[...]
> Reported-by: Hulk Robot <hulkci@huawei.com>
[...]

I am curious.  Anything else of interest did this robot reported under
the PCI tree?

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

Thank you!

Krzysztof

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

* Re: [PATCH -next] PCI: microchip: Make some symbols static
  2021-03-08  9:48 [PATCH -next] PCI: microchip: Make some symbols static 'Wei Yongjun
  2021-03-08 12:41 ` Krzysztof Wilczyński
@ 2021-03-22 14:24 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2021-03-22 14:24 UTC (permalink / raw)
  To: Daire McNamara, Bjorn Helgaas, 'Wei Yongjun
  Cc: Lorenzo Pieralisi, kernel-janitors, Hulk Robot, linux-pci

On Mon, 8 Mar 2021 09:48:42 +0000, 'Wei Yongjun wrote:
> The sparse tool complains as follows:
> 
> drivers/pci/controller/pcie-microchip-host.c:304:18: warning:
>  symbol 'pcie_event_to_event' was not declared. Should it be static?
> drivers/pci/controller/pcie-microchip-host.c:310:18: warning:
>  symbol 'sec_error_to_event' was not declared. Should it be static?
> drivers/pci/controller/pcie-microchip-host.c:317:18: warning:
>  symbol 'ded_error_to_event' was not declared. Should it be static?
> drivers/pci/controller/pcie-microchip-host.c:324:18: warning:
>  symbol 'local_status_to_event' was not declared. Should it be static?
> 
> [...]

Applied to pci/microchip, thanks!

[1/1] PCI: microchip: Make some symbols static
      https://git.kernel.org/lpieralisi/pci/c/2c61f32124

Thanks,
Lorenzo

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

end of thread, other threads:[~2021-03-22 14:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08  9:48 [PATCH -next] PCI: microchip: Make some symbols static 'Wei Yongjun
2021-03-08 12:41 ` Krzysztof Wilczyński
2021-03-22 14:24 ` Lorenzo Pieralisi

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).