From patchwork Sun Sep 25 09:20:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76974 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp653072qgf; Sun, 25 Sep 2016 02:20:59 -0700 (PDT) X-Received: by 10.98.62.194 with SMTP id y63mr27809526pfj.99.1474795259605; Sun, 25 Sep 2016 02:20:59 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yc2si8009352pab.124.2016.09.25.02.20.59; Sun, 25 Sep 2016 02:20:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1754801AbcIYJU5 (ORCPT + 27 others); Sun, 25 Sep 2016 05:20:57 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:34591 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938606AbcIYJUy (ORCPT ); Sun, 25 Sep 2016 05:20:54 -0400 Received: by mail-pa0-f53.google.com with SMTP id zl8so2934012pac.1 for ; Sun, 25 Sep 2016 02:20:54 -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=+3yaJdgUVGw6ac0JB24IInbSziW3x9KphLw8GqcTq0g=; b=YnmvOhtie2FwCnIwtzPMu5yXQYZdyHDBuiH2NzslP1yefkWa7cvg9OUcdNqenZURee mNNb1Zg4gBhh/ZTz56PAESNTII2M7cztjgcjxV3Z6oIm54VLg59pKJ99qDFmJzDOcNCB Tf/LjfN7iink2pjny39BiTMwO0jF/sKQMPdCM= 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=+3yaJdgUVGw6ac0JB24IInbSziW3x9KphLw8GqcTq0g=; b=HRdecks4VAfqoYy8+kkqH95y6aRVg2qPiFPo1JDhAV6yaxCdfD6I7wPEH69ylJAYaz bHNR85JzbqS0D2poSwVAF4V/xZuYVgDKkN2+qDPuGU3PPm3V1nigQauRvDyiiKDJheQr p81Q5VYG3dh3+XF3oPlRzOdhEgaEwF8ZvfxgoKTBo7EFhDHmuRmXNsdzBPqbgRsL10/k brilrGvIt0cHcEnwPPXqp/ucjbBHaV+3nZBHP2hWr9ASnF/LrrkNnOhYv9DT/kaKwq29 nIIloZxNMX/N4ISJ6ZOrVNqzw+GN53WRB9Il6nG5j5cDKkcaUMycFy/tiZ5ZdCyAo/2D c0gg== X-Gm-Message-State: AE9vXwP8GTnT7PNNfqql12dkkueTmZUERuvQe4jvwTXqrfRDOUO4L03bCwYoI1gU9Fnp4HZE X-Received: by 10.66.121.169 with SMTP id ll9mr28174042pab.54.1474795253623; Sun, 25 Sep 2016 02:20:53 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.164]) by smtp.gmail.com with ESMTPSA id mz4sm22906024pab.21.2016.09.25.02.20.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Sep 2016 02:20:52 -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, han.fei@zte.com.cn, tang.qiang007@zte.com.cn Subject: [PATCH] net: mvneta: mark symbols static where possible Date: Sun, 25 Sep 2016 17:20:41 +0800 Message-Id: <1474795241-23365-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 two 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..5cb07c2 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;