aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorBaoyou Xie <baoyou.xie@linaro.org>2016-09-06 04:19:02 -0400
committerDavid S. Miller <davem@davemloft.net>2016-09-06 18:58:59 -0400
commite0c79ff6286f534f3e9fadab529b0ce1e2c6d917 (patch)
tree38cb1848d1c636e85870a5dad282f63f731d8753 /drivers/net/usb
parentc63ad410a2379960238c82309eb9c18d0c893243 (diff)
lan78xx: mark symbols static where possible
We get a few warnings when building kernel with W=1: drivers/net/usb/lan78xx.c:1182:6: warning: no previous prototype for 'lan78xx_defer_kevent' [-Wmissing-prototypes] drivers/net/usb/lan78xx.c:1409:5: warning: no previous prototype for 'lan78xx_nway_reset' [-Wmissing-prototypes] drivers/net/usb/lan78xx.c:2000:5: warning: no previous prototype for 'lan78xx_set_mac_addr' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/lan78xx.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 432b8a3ae354..db558b8b32fe 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -1179,7 +1179,7 @@ static int lan78xx_link_reset(struct lan78xx_net *dev)
1179 * NOTE: annoying asymmetry: if it's active, schedule_work() fails, 1179 * NOTE: annoying asymmetry: if it's active, schedule_work() fails,
1180 * but tasklet_schedule() doesn't. hope the failure is rare. 1180 * but tasklet_schedule() doesn't. hope the failure is rare.
1181 */ 1181 */
1182void lan78xx_defer_kevent(struct lan78xx_net *dev, int work) 1182static void lan78xx_defer_kevent(struct lan78xx_net *dev, int work)
1183{ 1183{
1184 set_bit(work, &dev->flags); 1184 set_bit(work, &dev->flags);
1185 if (!schedule_delayed_work(&dev->wq, 0)) 1185 if (!schedule_delayed_work(&dev->wq, 0))
@@ -1406,7 +1406,7 @@ static u32 lan78xx_get_link(struct net_device *net)
1406 return net->phydev->link; 1406 return net->phydev->link;
1407} 1407}
1408 1408
1409int lan78xx_nway_reset(struct net_device *net) 1409static int lan78xx_nway_reset(struct net_device *net)
1410{ 1410{
1411 return phy_start_aneg(net->phydev); 1411 return phy_start_aneg(net->phydev);
1412} 1412}
@@ -1997,7 +1997,7 @@ static int lan78xx_change_mtu(struct net_device *netdev, int new_mtu)
1997 return 0; 1997 return 0;
1998} 1998}
1999 1999
2000int lan78xx_set_mac_addr(struct net_device *netdev, void *p) 2000static int lan78xx_set_mac_addr(struct net_device *netdev, void *p)
2001{ 2001{
2002 struct lan78xx_net *dev = netdev_priv(netdev); 2002 struct lan78xx_net *dev = netdev_priv(netdev);
2003 struct sockaddr *addr = p; 2003 struct sockaddr *addr = p;
@@ -2371,7 +2371,7 @@ static void lan78xx_terminate_urbs(struct lan78xx_net *dev)
2371 remove_wait_queue(&unlink_wakeup, &wait); 2371 remove_wait_queue(&unlink_wakeup, &wait);
2372} 2372}
2373 2373
2374int lan78xx_stop(struct net_device *net) 2374static int lan78xx_stop(struct net_device *net)
2375{ 2375{
2376 struct lan78xx_net *dev = netdev_priv(net); 2376 struct lan78xx_net *dev = netdev_priv(net);
2377 2377
@@ -2533,7 +2533,8 @@ static void lan78xx_queue_skb(struct sk_buff_head *list,
2533 entry->state = state; 2533 entry->state = state;
2534} 2534}
2535 2535
2536netdev_tx_t lan78xx_start_xmit(struct sk_buff *skb, struct net_device *net) 2536static netdev_tx_t
2537lan78xx_start_xmit(struct sk_buff *skb, struct net_device *net)
2537{ 2538{
2538 struct lan78xx_net *dev = netdev_priv(net); 2539 struct lan78xx_net *dev = netdev_priv(net);
2539 struct sk_buff *skb2 = NULL; 2540 struct sk_buff *skb2 = NULL;
@@ -2562,7 +2563,8 @@ netdev_tx_t lan78xx_start_xmit(struct sk_buff *skb, struct net_device *net)
2562 return NETDEV_TX_OK; 2563 return NETDEV_TX_OK;
2563} 2564}
2564 2565
2565int lan78xx_get_endpoints(struct lan78xx_net *dev, struct usb_interface *intf) 2566static int
2567lan78xx_get_endpoints(struct lan78xx_net *dev, struct usb_interface *intf)
2566{ 2568{
2567 int tmp; 2569 int tmp;
2568 struct usb_host_interface *alt = NULL; 2570 struct usb_host_interface *alt = NULL;
@@ -2700,7 +2702,7 @@ static void lan78xx_rx_csum_offload(struct lan78xx_net *dev,
2700 } 2702 }
2701} 2703}
2702 2704
2703void lan78xx_skb_return(struct lan78xx_net *dev, struct sk_buff *skb) 2705static void lan78xx_skb_return(struct lan78xx_net *dev, struct sk_buff *skb)
2704{ 2706{
2705 int status; 2707 int status;
2706 2708
@@ -3283,7 +3285,7 @@ static void lan78xx_disconnect(struct usb_interface *intf)
3283 usb_put_dev(udev); 3285 usb_put_dev(udev);
3284} 3286}
3285 3287
3286void lan78xx_tx_timeout(struct net_device *net) 3288static void lan78xx_tx_timeout(struct net_device *net)
3287{ 3289{
3288 struct lan78xx_net *dev = netdev_priv(net); 3290 struct lan78xx_net *dev = netdev_priv(net);
3289 3291
@@ -3603,7 +3605,7 @@ static int lan78xx_set_suspend(struct lan78xx_net *dev, u32 wol)
3603 return 0; 3605 return 0;
3604} 3606}
3605 3607
3606int lan78xx_suspend(struct usb_interface *intf, pm_message_t message) 3608static int lan78xx_suspend(struct usb_interface *intf, pm_message_t message)
3607{ 3609{
3608 struct lan78xx_net *dev = usb_get_intfdata(intf); 3610 struct lan78xx_net *dev = usb_get_intfdata(intf);
3609 struct lan78xx_priv *pdata = (struct lan78xx_priv *)(dev->data[0]); 3611 struct lan78xx_priv *pdata = (struct lan78xx_priv *)(dev->data[0]);
@@ -3699,7 +3701,7 @@ out:
3699 return ret; 3701 return ret;
3700} 3702}
3701 3703
3702int lan78xx_resume(struct usb_interface *intf) 3704static int lan78xx_resume(struct usb_interface *intf)
3703{ 3705{
3704 struct lan78xx_net *dev = usb_get_intfdata(intf); 3706 struct lan78xx_net *dev = usb_get_intfdata(intf);
3705 struct sk_buff *skb; 3707 struct sk_buff *skb;
@@ -3766,7 +3768,7 @@ int lan78xx_resume(struct usb_interface *intf)
3766 return 0; 3768 return 0;
3767} 3769}
3768 3770
3769int lan78xx_reset_resume(struct usb_interface *intf) 3771static int lan78xx_reset_resume(struct usb_interface *intf)
3770{ 3772{
3771 struct lan78xx_net *dev = usb_get_intfdata(intf); 3773 struct lan78xx_net *dev = usb_get_intfdata(intf);
3772 3774