Skip to contentSkip to conversation

xhci: dbc: Make function xhci_dbc_ring_alloc() static

PATCH New Wei Yongjun 1 participant 1 message Jul 27, 2020

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

PATCH 1/1 xhci: dbc: Make function xhci_dbc_ring_alloc() static

The sparse tool complains as follows:

drivers/usb/host/xhci-dbgcap.c:422:18: warning:
symbol 'xhci_dbc_ring_alloc' was not declared. Should it be static?

This function is not used outside ofxhci-dbgcap.c, so this commit marks it static.

Fixes ac286428c69f ("xhci: dbc: don't use generic xhci ring allocation functions for dbc.")
---
 drivers/usb/host/xhci-dbgcap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-dbgcap.c +1 -1
index c57178db7994..fcc5ac5ce8b1 100644
@@ -419,7 +419,7 @@ dbc_alloc_ctx(struct device *dev, gfp_t flags)
 	return ctx;
 }
 
-struct xhci_ring *
+static struct xhci_ring *
 xhci_dbc_ring_alloc(struct device *dev, enum xhci_ring_type type, gfp_t flags)
 {
 	struct xhci_ring *ring;