Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] usb: xhci: make symbols static
@ 2020-05-19  9:30 Vinod Koul
  0 siblings, 0 replies; only message in thread
From: Vinod Koul @ 2020-05-19  9:30 UTC (permalink / raw)
  To: Mathias Nyman, Greg Kroah-Hartman
  Cc: Vinod Koul, Christian Lamparter, linux-usb, linux-kernel,
	kbuild test robot

When renesas module is not built, we get compiler warning on xhci driver
with W=1

  CC [M]  drivers/usb/host/xhci-rcar.o
drivers/usb/host/xhci-pci.h:13:5: warning: no previous prototype for ‘renesas_xhci_check_request_fw’ [-Wmissing-prototypes]
 int renesas_xhci_check_request_fw(struct pci_dev *dev,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-pci.h:19:6: warning: no previous prototype for ‘renesas_xhci_pci_exit’ [-Wmissing-prototypes]
 void renesas_xhci_pci_exit(struct pci_dev *dev) { };
      ^~~~~~~~~~~~~~~~~~~~~

We have defined these symbols when CONFIG_USB_XHCI_PCI_RENESAS is not
defined, but missed making then static.

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 8bd5741e3145 ("usb: renesas-xhci: Add the renesas xhci driver")
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 drivers/usb/host/xhci-pci.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/xhci-pci.h b/drivers/usb/host/xhci-pci.h
index 4d749556e350..acd7cf0a1706 100644
--- a/drivers/usb/host/xhci-pci.h
+++ b/drivers/usb/host/xhci-pci.h
@@ -10,13 +10,13 @@ int renesas_xhci_check_request_fw(struct pci_dev *dev,
 void renesas_xhci_pci_exit(struct pci_dev *dev);
 
 #else
-int renesas_xhci_check_request_fw(struct pci_dev *dev,
-				  const struct pci_device_id *id)
+static int renesas_xhci_check_request_fw(struct pci_dev *dev,
+					 const struct pci_device_id *id)
 {
 	return 0;
 }
 
-void renesas_xhci_pci_exit(struct pci_dev *dev) { };
+static void renesas_xhci_pci_exit(struct pci_dev *dev) { };
 
 #endif
 
-- 
2.25.4


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

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19  9:30 [PATCH] usb: xhci: make symbols static Vinod Koul

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git