Skip to contentSkip to conversation

PCI: microchip: Make the struct event_descs static

PATCH Applied Krzysztof Wilczyński 2 participants 2 messages May 9, 2021 – Jun 3, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: microchip: Make the struct event_descs static

The struct event_descs does not have any users outside the pcie-microchip-host.c file, and has no previous declaration, thus it can be made static.

This resolves the following sparse warning:

drivers/pci/controller/pcie-microchip-host.c:352:3: warning: symbol 'event_descs' was not declared. Should it be static?

---
 drivers/pci/controller/pcie-microchip-host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/pcie-microchip-host.c +1 -1
index 89c68c56d93b..fdab8202ae5d 100644
@@ -341,7 +341,7 @@ static struct event_map local_status_to_event[] = {
 	LOCAL_STATUS_TO_EVENT_MAP(PM_MSI_INT_SYS_ERR),
 };
 
-struct {
+static struct {
 	u32 base;
 	u32 offset;
 	u32 mask;
Signature · 1 line
2.31.1
#1 lore raw
Quoted 7 lines · Krzysztof Wilczyński

The struct event_descs does not have any users outside the pcie-microchip-host.c file, and has no previous declaration, thus it can be made static.

This resolves the following sparse warning:

drivers/pci/controller/pcie-microchip-host.c:352:3: warning: symbol 'event_descs' was not declared. Should it be static?

Applied to pci/microchip, thanks!

[1/1] PCI: microchip: Make the struct event_descs static

      https://git.kernel.org/lpieralisi/pci/c/1243106474

Thanks,
Lorenzo