Message ID | 1498116915-12578-1-git-send-email-yamada.masahiro@socionext.com |
---|---|
State | Accepted |
Commit | 121a4d13e679d86bf55bb3941eb33b10fa8c785b |
Headers | show |
On Thu, Jun 22, 2017 at 3:35 PM, Masahiro Yamada <yamada.masahiro@socionext.com> wrote: > Sparse reports "... was not declared. Should it be static?" > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> > --- > > 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(-) > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
On 06/22/2017 09:35 AM, Masahiro Yamada wrote: > Sparse reports "... was not declared. Should it be static?" > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Applied, thanks. > --- > > 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; >
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;
Sparse reports "... was not declared. Should it be static?" Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- 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(-)