linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] xhci: dbgtty: Make some functions static
@ 2020-07-27 17:11 Wei Yongjun
  0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2020-07-27 17:11 UTC (permalink / raw)
  To: Hulk Robot, Mathias Nyman, Greg Kroah-Hartman; +Cc: Wei Yongjun, linux-usb

The sparse tool complains as follows:

drivers/usb/host/xhci-dbgtty.c:401:5: warning:
 symbol 'xhci_dbc_tty_register_device' was not declared. Should it be static?
drivers/usb/host/xhci-dbgtty.c:452:6: warning:
 symbol 'xhci_dbc_tty_unregister_device' was not declared. Should it be static?

After commit 6ae6470bfa33 ("xhci: dbc: Add a operations structure
to access driver functions"), those functions are not used outside
of xhci-dbgtty.c, so this commit marks them static.

Fixes: 6ae6470bfa33 ("xhci: dbc: Add a operations structure to access driver functions")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/usb/host/xhci-dbgtty.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/xhci-dbgtty.c b/drivers/usb/host/xhci-dbgtty.c
index 0b942112b6f8..b8918f73a432 100644
--- a/drivers/usb/host/xhci-dbgtty.c
+++ b/drivers/usb/host/xhci-dbgtty.c
@@ -398,7 +398,7 @@ xhci_dbc_tty_exit_port(struct dbc_port *port)
 	tty_port_destroy(&port->port);
 }
 
-int xhci_dbc_tty_register_device(struct xhci_dbc *dbc)
+static int xhci_dbc_tty_register_device(struct xhci_dbc *dbc)
 {
 	int			ret;
 	struct device		*tty_dev;
@@ -449,7 +449,7 @@ int xhci_dbc_tty_register_device(struct xhci_dbc *dbc)
 	return ret;
 }
 
-void xhci_dbc_tty_unregister_device(struct xhci_dbc *dbc)
+static void xhci_dbc_tty_unregister_device(struct xhci_dbc *dbc)
 {
 	struct dbc_port		*port = dbc_to_port(dbc);
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-27 17:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 17:11 [PATCH -next] xhci: dbgtty: Make some functions static Wei Yongjun

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