From patchwork Tue Sep 6 08:19:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 75479 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp425396qgf; Tue, 6 Sep 2016 01:19:57 -0700 (PDT) X-Received: by 10.66.5.5 with SMTP id o5mr14118321pao.38.1473149995825; Tue, 06 Sep 2016 01:19:55 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a4si34238209pav.72.2016.09.06.01.19.49; Tue, 06 Sep 2016 01:19:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753466AbcIFITh (ORCPT + 4 others); Tue, 6 Sep 2016 04:19:37 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:36244 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754627AbcIFIT3 (ORCPT ); Tue, 6 Sep 2016 04:19:29 -0400 Received: by mail-pf0-f179.google.com with SMTP id h186so72104675pfg.3 for ; Tue, 06 Sep 2016 01:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=U0s+vMF9YbRnsQIhbvZUwXihmaR2nyCOafOARRPZdjo=; b=DLyJLX8pajvYyjb8BC3Qbto1DKUuj8NL53LO4K/rp+LX+BuuZvTC4lkeMz01aAdPaP 1yF9OMnd3Te8xrKX/hKFBJkwj6/gMFEdnFfLHYmGaohHNPapgrjcATslg6O7xby6q9rg Dt6X0ktVbxcrFBeGPATp5hWzbeg9ftAb0egvU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=U0s+vMF9YbRnsQIhbvZUwXihmaR2nyCOafOARRPZdjo=; b=GAMXiOIXPE/gG3KGqGJE2oykwpDXr4Nq2tXOYYc61tqoH9EEe78z7QkJvZLU8O00+u gAC9N43/InGr385Uw2bG7fH5z5O2eqbMwNcPTvWntvRawFBGh2byzDxisxh4O/P9fgeP pTdFrjMRq1dezge0cA9F3NoCyPmd/IT+mobT+O9TVKPnTbzzm/VUcMQtO7GsVNNomEnS vbI2VyBjsJMxny3ZLDQuts/BpVLgrGIYTiLiU+6sfPcx7Trt+pSkXVKoQk5Q8rm5SObc rEPCEM7PhbiaTOJGKM9+kru0mlhdeT+ZDvCVeeGm8GsduwO3/y9QuQYIeP7b91hgMBU3 UU3A== X-Gm-Message-State: AE9vXwPUZX4tg+pnWkCMj/zmg3LM6w/pNBNVw6aktcJ0I3hB/q1NFj8ZkqaHtIhr74d/1uEO X-Received: by 10.98.66.74 with SMTP id p71mr43180855pfa.143.1473149968904; Tue, 06 Sep 2016 01:19:28 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.17]) by smtp.gmail.com with ESMTPSA id n3sm38844942paf.13.2016.09.06.01.19.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Sep 2016 01:19:28 -0700 (PDT) From: Baoyou Xie To: woojung.huh@microchip.com, UNGLinuxDriver@microchip.com Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] lan78xx: mark symbols static where possible Date: Tue, 6 Sep 2016 16:19:02 +0800 Message-Id: <1473149942-26130-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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 --- drivers/net/usb/lan78xx.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 6a9d474..8c467a5 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) * NOTE: annoying asymmetry: if it's active, schedule_work() fails, * but tasklet_schedule() doesn't. hope the failure is rare. */ -void lan78xx_defer_kevent(struct lan78xx_net *dev, int work) +static void lan78xx_defer_kevent(struct lan78xx_net *dev, int work) { set_bit(work, &dev->flags); if (!schedule_delayed_work(&dev->wq, 0)) @@ -1406,7 +1406,7 @@ static u32 lan78xx_get_link(struct net_device *net) return net->phydev->link; } -int lan78xx_nway_reset(struct net_device *net) +static int lan78xx_nway_reset(struct net_device *net) { return phy_start_aneg(net->phydev); } @@ -1997,7 +1997,7 @@ static int lan78xx_change_mtu(struct net_device *netdev, int new_mtu) return 0; } -int lan78xx_set_mac_addr(struct net_device *netdev, void *p) +static int lan78xx_set_mac_addr(struct net_device *netdev, void *p) { struct lan78xx_net *dev = netdev_priv(netdev); struct sockaddr *addr = p; @@ -2371,7 +2371,7 @@ static void lan78xx_terminate_urbs(struct lan78xx_net *dev) remove_wait_queue(&unlink_wakeup, &wait); } -int lan78xx_stop(struct net_device *net) +static int lan78xx_stop(struct net_device *net) { struct lan78xx_net *dev = netdev_priv(net); @@ -2533,7 +2533,8 @@ static void lan78xx_queue_skb(struct sk_buff_head *list, entry->state = state; } -netdev_tx_t lan78xx_start_xmit(struct sk_buff *skb, struct net_device *net) +static netdev_tx_t +lan78xx_start_xmit(struct sk_buff *skb, struct net_device *net) { struct lan78xx_net *dev = netdev_priv(net); struct sk_buff *skb2 = NULL; @@ -2562,7 +2563,8 @@ netdev_tx_t lan78xx_start_xmit(struct sk_buff *skb, struct net_device *net) return NETDEV_TX_OK; } -int lan78xx_get_endpoints(struct lan78xx_net *dev, struct usb_interface *intf) +static int +lan78xx_get_endpoints(struct lan78xx_net *dev, struct usb_interface *intf) { int tmp; struct usb_host_interface *alt = NULL; @@ -2700,7 +2702,7 @@ static void lan78xx_rx_csum_offload(struct lan78xx_net *dev, } } -void lan78xx_skb_return(struct lan78xx_net *dev, struct sk_buff *skb) +static void lan78xx_skb_return(struct lan78xx_net *dev, struct sk_buff *skb) { int status; @@ -3285,7 +3287,7 @@ static void lan78xx_disconnect(struct usb_interface *intf) usb_put_dev(udev); } -void lan78xx_tx_timeout(struct net_device *net) +static void lan78xx_tx_timeout(struct net_device *net) { struct lan78xx_net *dev = netdev_priv(net); @@ -3605,7 +3607,7 @@ static int lan78xx_set_suspend(struct lan78xx_net *dev, u32 wol) return 0; } -int lan78xx_suspend(struct usb_interface *intf, pm_message_t message) +static int lan78xx_suspend(struct usb_interface *intf, pm_message_t message) { struct lan78xx_net *dev = usb_get_intfdata(intf); struct lan78xx_priv *pdata = (struct lan78xx_priv *)(dev->data[0]); @@ -3701,7 +3703,7 @@ out: return ret; } -int lan78xx_resume(struct usb_interface *intf) +static int lan78xx_resume(struct usb_interface *intf) { struct lan78xx_net *dev = usb_get_intfdata(intf); struct sk_buff *skb; @@ -3768,7 +3770,7 @@ int lan78xx_resume(struct usb_interface *intf) return 0; } -int lan78xx_reset_resume(struct usb_interface *intf) +static int lan78xx_reset_resume(struct usb_interface *intf) { struct lan78xx_net *dev = usb_get_intfdata(intf);