From patchwork Sun Sep 18 09:20:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76457 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp454770qgf; Sun, 18 Sep 2016 02:21:06 -0700 (PDT) X-Received: by 10.66.146.200 with SMTP id te8mr23522899pab.162.1474190466083; Sun, 18 Sep 2016 02:21:06 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si21913255pap.88.2016.09.18.02.21.05; Sun, 18 Sep 2016 02:21:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756698AbcIRJVB (ORCPT + 4 others); Sun, 18 Sep 2016 05:21:01 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:36391 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755076AbcIRJU6 (ORCPT ); Sun, 18 Sep 2016 05:20:58 -0400 Received: by mail-pa0-f47.google.com with SMTP id id6so39029208pad.3 for ; Sun, 18 Sep 2016 02:20:57 -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=V0TrII8sDdl2y2kzxgr43VkqOR080AaX0qywFwRg3Z0=; b=D7T85pIbj8Un47WW+u58MwK/ZdtSRt/NvZZRGGzNtXD4HNFfP+NvgFFSQyoFrWtkt0 Ygky6w/oAtn8OhizGO5Ld5SckNGUaZaYpD2gpHILuamNDSVZ1xc0b4hFeHVzIOfwTpwq 1TPp1vT8WWb1NFwygvswRtOcwWkuhspiFim60= 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=V0TrII8sDdl2y2kzxgr43VkqOR080AaX0qywFwRg3Z0=; b=hWQgDutFZS396wUJ4G5as+pAOeec4Ows9J57XPwEjR3hUgz6GnJX71OmuYbPOuUcUR g/CK8FRgttTBUEK5s1rwG7SpK7w9xLWdtUdFUk3SzoPlhGXeYXRtJnbTk5WbHLRmuGuy WBeMvUitVTt3Nz/Y9NhXDeZk76j5VXxVuSebIGxBwS2JZgfvdgEj2GKdEn5jFplfP/Wx 7J2lzoURIC00EdakeLLVArMjBKIO6+eOYVooUGQISk8p2aBtOzA4aIctLokni/k9VBHv rFXrJqu15w5v9xovb6cxWH3jB+tnpfRLm10/EePha90QMaPVfgMLrnV9vAYzhgkTM+my YPkQ== X-Gm-Message-State: AE9vXwOZpakqIzmN6i8Hn7gJnp8BjOjNcQ431Z3Sl5f/LeDQe1fJcp80RRfC3gJcHmw5qt4l X-Received: by 10.66.150.39 with SMTP id uf7mr37192863pab.23.1474190457453; Sun, 18 Sep 2016 02:20:57 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.27]) by smtp.gmail.com with ESMTPSA id 69sm2505496pfu.83.2016.09.18.02.20.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Sep 2016 02:20:56 -0700 (PDT) From: Baoyou Xie To: thomas.petazzoni@free-electrons.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] net: mvneta: mark symbols static where possible Date: Sun, 18 Sep 2016 17:20:45 +0800 Message-Id: <1474190445-5887-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We get 2 warnings when building kernel with W=1: drivers/net/ethernet/marvell/mvneta.c:639:27: warning: no previous prototype for 'mvneta_get_stats64' [-Wmissing-prototypes] drivers/net/ethernet/marvell/mvneta.c:3529:5: warning: no previous prototype for 'mvneta_ethtool_set_link_ksettings' [-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/ethernet/marvell/mvneta.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 32f0cc4..03be592 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -636,8 +636,9 @@ static void mvneta_mib_counters_clear(struct mvneta_port *pp) } /* Get System Network Statistics */ -struct rtnl_link_stats64 *mvneta_get_stats64(struct net_device *dev, - struct rtnl_link_stats64 *stats) +static struct +rtnl_link_stats64 *mvneta_get_stats64(struct net_device *dev, + struct rtnl_link_stats64 *stats) { struct mvneta_port *pp = netdev_priv(dev); unsigned int start; @@ -3526,8 +3527,9 @@ static int mvneta_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) /* Ethtool methods */ /* Set link ksettings (phy address, speed) for ethtools */ -int mvneta_ethtool_set_link_ksettings(struct net_device *ndev, - const struct ethtool_link_ksettings *cmd) +static int +mvneta_ethtool_set_link_ksettings(struct net_device *ndev, + const struct ethtool_link_ksettings *cmd) { struct mvneta_port *pp = netdev_priv(ndev); struct phy_device *phydev = ndev->phydev;