From patchwork Thu Jun 22 07:35:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 106157 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp2325412qgd; Thu, 22 Jun 2017 00:35:57 -0700 (PDT) X-Received: by 10.80.214.89 with SMTP id c25mr1520680edj.13.1498116957097; Thu, 22 Jun 2017 00:35:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498116957; cv=none; d=google.com; s=arc-20160816; b=v5B690dDDooabF+lkQAqHZuRr9JlA1DdRUWKjyTJECyQUBY/2N/Brg/1Sbyxq3smVl MPyDzMvnTd4z3OM1TEpsenjp+6R32YDMWnfozYMlZTS+A45YvrIFbqdTKiVQz1/KLR/U GK+VdF3JSQcYh5CrU7JpS10B58PwqiRr0LfNRmjhaAE7OIV+tppjdWDPrpVjG4u2eCYt T+3Ub9v1bPql4RdWZWQUX/XAup27sNV7648sqMZew7HfuBhDjW/iLbHcB8ktxnhAxZZi fx4z9FWo046i0bPe8O5HuRpMGoqupwXdvGl4e4M4nXpi6+4h1JuFXWEIMa+360724OCm GQgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=Y7wjs4ceE6eD4c95dBoXFKJ4v2+0YrxyZ8DCEjmbMkI=; b=rO6cmwuHqdM4M+uHnON3z4II47/L4TTmU4VSRo8HecfFuvQi+xpFzjq/uycr6nCHPa VcGixaK73fOzV2oDWnh/aBJx6bUCLMr4qiHGdIum3csyejRAo9S7ymRnX/sEbVpKU3pc Ok8J8N8cKPtZpBcZ5wUPHuWsjlsYGzl/HZ/4SQDFx6t8wn5y9i5lBFy484S2gbXPcRQ3 JsJerLMVmUqa4SY6iFyeiCnT3diw6SDR99xSLhizh8xBUFjmtpqQSt7JLpZMNW3A5nDn 2yzfs3NNqxSL+v6CQqNT8sTkiRt6V6i6ygvHwzXRSIZaxrQwaBm67A2lTW7MeJnlSnSt qoUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=N1h1ds83; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id a16si945551eda.237.2017.06.22.00.35.56; Thu, 22 Jun 2017 00:35:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=N1h1ds83; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 9AC2DC21C99; Thu, 22 Jun 2017 07:35:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5D76BC21C76; Thu, 22 Jun 2017 07:35:52 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C6505C21CA3; Thu, 22 Jun 2017 07:35:48 +0000 (UTC) Received: from conuserg-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) by lists.denx.de (Postfix) with ESMTPS id D4526C21C99 for ; Thu, 22 Jun 2017 07:35:46 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id v5M7ZGKO013388; Thu, 22 Jun 2017 16:35:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com v5M7ZGKO013388 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1498116917; bh=To8YiiTjt5ygrlavwPTOZ6t0OzkRA7Wu9tZkwp4SnKk=; h=From:To:Cc:Subject:Date:From; b=N1h1ds83cCDmjQ3ltiWlaCQ9QtJos21tikp7742A7/KpGuFltPTjcJo55vSHnIFd1 WRpovuAvA2fdc1IsXplQbUXLY439HKw+JNGvdh4MF5zPUPC68lO/+TqRJYqQ1dG0W9 iTEE4kZxfqcfxgnA06PSat+eY7IU4HcwVuQOpJPaFntQW2m0iTx2akSBeenbPE5w75 4qe5vMhx0RA5jD2HBqU67Nf//Xl/NyitR4rZHTsuwaLgcPM+VWw2IQZHNI0oGjVIxB 7eDTwKaOZ3cjQX0NJyb9GSFy44walKuYZd5LpwFF62SNAHlsNUYBQYChf0jlEZ/GDa 3B47W1fWQ9SQw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 22 Jun 2017 16:35:14 +0900 Message-Id: <1498116915-12578-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Cc: Marek Vasut , Stefan Roese Subject: [U-Boot] [PATCH] usb: add static to local symbols X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Sparse reports "... was not declared. Should it be static?" Signed-off-by: Masahiro Yamada Reviewed-by: Bin Meng --- drivers/usb/host/ehci-hcd.c | 2 +- drivers/usb/host/usb-uclass.c | 18 +++++++++--------- drivers/usb/host/xhci-dwc3.c | 2 +- drivers/usb/host/xhci.c | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 13aa70d60661..f08709d0212d 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -937,7 +937,7 @@ unknown: return -1; } -const struct ehci_ops default_ehci_ops = { +static const struct ehci_ops default_ehci_ops = { .set_usb_mode = ehci_set_usbmode, .get_port_speed = ehci_get_port_speed, .powerup_fixup = ehci_powerup_fixup, diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c index 110ddc92fa3a..efc5d4e7d7b0 100644 --- a/drivers/usb/host/usb-uclass.c +++ b/drivers/usb/host/usb-uclass.c @@ -373,8 +373,8 @@ int usb_setup_ehci_gadget(struct ehci_ctrl **ctlrp) } /* returns 0 if no match, 1 if match */ -int usb_match_device(const struct usb_device_descriptor *desc, - const struct usb_device_id *id) +static int usb_match_device(const struct usb_device_descriptor *desc, + const struct usb_device_id *id) { if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && id->idVendor != le16_to_cpu(desc->idVendor)) @@ -410,9 +410,9 @@ int usb_match_device(const struct usb_device_descriptor *desc, } /* returns 0 if no match, 1 if match */ -int usb_match_one_id_intf(const struct usb_device_descriptor *desc, - const struct usb_interface_descriptor *int_desc, - const struct usb_device_id *id) +static int usb_match_one_id_intf(const struct usb_device_descriptor *desc, + const struct usb_interface_descriptor *int_desc, + const struct usb_device_id *id) { /* The interface class, subclass, protocol and number should never be * checked for a match if the device class is Vendor Specific, @@ -445,9 +445,9 @@ int usb_match_one_id_intf(const struct usb_device_descriptor *desc, } /* returns 0 if no match, 1 if match */ -int usb_match_one_id(struct usb_device_descriptor *desc, - struct usb_interface_descriptor *int_desc, - const struct usb_device_id *id) +static int usb_match_one_id(struct usb_device_descriptor *desc, + struct usb_interface_descriptor *int_desc, + const struct usb_device_id *id) { if (!usb_match_device(desc, id)) return 0; @@ -680,7 +680,7 @@ int usb_detect_change(void) return change; } -int usb_child_post_bind(struct udevice *dev) +static int usb_child_post_bind(struct udevice *dev) { struct usb_dev_platdata *plat = dev_get_parent_platdata(dev); int val; diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c index 33961cd63455..a4591f2e02ca 100644 --- a/drivers/usb/host/xhci-dwc3.c +++ b/drivers/usb/host/xhci-dwc3.c @@ -19,7 +19,7 @@ void dwc3_set_mode(struct dwc3 *dwc3_reg, u32 mode) DWC3_GCTL_PRTCAPDIR(mode)); } -void dwc3_phy_reset(struct dwc3 *dwc3_reg) +static void dwc3_phy_reset(struct dwc3 *dwc3_reg) { /* Assert USB3 PHY reset */ setbits_le32(&dwc3_reg->g_usb3pipectl[0], DWC3_GUSB3PIPECTL_PHYSOFTRST); diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 32011774768f..bd8f4c43b4b2 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -192,7 +192,7 @@ static int xhci_start(struct xhci_hcor *hcor) * @param hcor pointer to host controller operation registers * @return -EBUSY if XHCI Controller is not halted else status of handshake */ -int xhci_reset(struct xhci_hcor *hcor) +static int xhci_reset(struct xhci_hcor *hcor) { u32 cmd; u32 state; @@ -481,7 +481,7 @@ static int xhci_address_device(struct usb_device *udev, int root_portnr) * @param udev pointer to the Device Data Structure * @return Returns 0 on succes else return error code on failure */ -int _xhci_alloc_device(struct usb_device *udev) +static int _xhci_alloc_device(struct usb_device *udev) { struct xhci_ctrl *ctrl = xhci_get_ctrl(udev); union xhci_trb *event;