From patchwork Fri Sep 30 07:48:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 77158 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp130958qgf; Fri, 30 Sep 2016 00:49:24 -0700 (PDT) X-Received: by 10.66.160.72 with SMTP id xi8mr9451856pab.78.1475221764623; Fri, 30 Sep 2016 00:49:24 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si18877509pfp.114.2016.09.30.00.49.24; Fri, 30 Sep 2016 00:49:24 -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 S932188AbcI3HtW (ORCPT + 27 others); Fri, 30 Sep 2016 03:49:22 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:34692 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751076AbcI3HtM (ORCPT ); Fri, 30 Sep 2016 03:49:12 -0400 Received: by mail-pf0-f173.google.com with SMTP id u78so12344198pfa.1 for ; Fri, 30 Sep 2016 00:49:12 -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=U18v6NTeE7yNQIZ8KiNaznN3ar+Rzfwc6IA8g+gsuFk=; b=G3+4WuKEgggwrO4WMfoqSU4HYCrscEduHEYuxLxpc8k8/u4dG6CiJH4W8C7nO1dbcx EwqTMgKmFXzBcDDovrrKCZ/v5kAOKPbVBSQWjF75hrQGb0XhFfmd4So+0mx/fIhpipGa d/9+9s2wc+M7yedciE3m2ZIdp7Ln4t4NvrLs0= 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=U18v6NTeE7yNQIZ8KiNaznN3ar+Rzfwc6IA8g+gsuFk=; b=TSUw7Xd9qPUXck4jHhAx56sUt5HHQRJua2xxHHJmMsVV18IsyTW24ucjifFtGpqDLN 6tkYZXcdWHaTCzxT3HUe3jyWjySfrD9D0nBJM1BE+IpYSEwzTw+oPWCXAf9EBdqzH+Ia UeG7dGedDAk+1PUI74wxh3FSgOyTSBkG9vREQnAK2hkAwKQUF3oOVivBBf3XYaWNFiiw 3oSukCIDR/1XFYojIQ+kpik3Ztbd+QqDeKXzeJlVodv6Iq/mUdv3NbP5suDRta5yaevV 85Jt1eSiGM04caxbgYB9XXCJKuG6XoR/DjVAKdta7eI3KVghY+LPDSzF5vnDPamFPXe1 dpDQ== X-Gm-Message-State: AA6/9Rn9VNwSi0kQuvMzan7x16EsO3qB5bLDQmtGMXZDMYLY8LMcDbTFKscXplUbMkhh0KWp X-Received: by 10.98.70.132 with SMTP id o4mr9662876pfi.132.1475221751632; Fri, 30 Sep 2016 00:49:11 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.182]) by smtp.gmail.com with ESMTPSA id t67sm25375613pfd.32.2016.09.30.00.49.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Sep 2016 00:49:10 -0700 (PDT) From: Baoyou Xie To: nbd@openwrt.org, blogic@openwrt.org, matthias.bgg@gmail.com Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.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: ethernet: mediatek: mark symbols static where possible Date: Fri, 30 Sep 2016 15:48:50 +0800 Message-Id: <1475221730-18773-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/mediatek/mtk_eth_soc.c:2041:5: warning: no previous prototype for 'mtk_get_link_ksettings' [-Wmissing-prototypes] drivers/net/ethernet/mediatek/mtk_eth_soc.c:2052:5: warning: no previous prototype for 'mtk_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/mediatek/mtk_eth_soc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index ddf20a0..ad4ab97 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -2038,8 +2038,8 @@ static int mtk_cleanup(struct mtk_eth *eth) return 0; } -int mtk_get_link_ksettings(struct net_device *ndev, - struct ethtool_link_ksettings *cmd) +static int mtk_get_link_ksettings(struct net_device *ndev, + struct ethtool_link_ksettings *cmd) { struct mtk_mac *mac = netdev_priv(ndev); @@ -2049,8 +2049,8 @@ int mtk_get_link_ksettings(struct net_device *ndev, return phy_ethtool_ksettings_get(ndev->phydev, cmd); } -int mtk_set_link_ksettings(struct net_device *ndev, - const struct ethtool_link_ksettings *cmd) +static int mtk_set_link_ksettings(struct net_device *ndev, + const struct ethtool_link_ksettings *cmd) { struct mtk_mac *mac = netdev_priv(ndev);