mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ioana Radulescu <ruxandra.radulescu@nxp.com>
To: <gregkh@linuxfoundation.org>
Cc: <devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>,
	<agraf@suse.de>, <arnd@arndb.de>,
	<linux-arm-kernel@lists.infradead.org>,
	<bogdan.purcareata@nxp.com>, <stuyoder@gmail.com>,
	<laurentiu.tudor@nxp.com>, <Bharat.Bhushan@nxp.com>
Subject: [PATCH 01/18] staging: fsl-dpaa2/eth: Add "static" keyword where needed
Date: Tue, 6 Jun 2017 10:00:24 -0500	[thread overview]
Message-ID: <20170606150041.10955-2-ruxandra.radulescu@nxp.com> (raw)
In-Reply-To: <20170606150041.10955-1-ruxandra.radulescu@nxp.com>

Make a couple of locally used functions and structures static.
Issue found through static analysis tool.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
---
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c     | 6 +++---
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h     | 2 --
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 4 ++--
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
index 49c435bad706..8ff8951f31b9 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
@@ -1162,8 +1162,8 @@ static int dpaa2_eth_set_addr(struct net_device *net_dev, void *addr)
 /** Fill in counters maintained by the GPP driver. These may be different from
  * the hardware counters obtained by ethtool.
  */
-void dpaa2_eth_get_stats(struct net_device *net_dev,
-			 struct rtnl_link_stats64 *stats)
+static void dpaa2_eth_get_stats(struct net_device *net_dev,
+				struct rtnl_link_stats64 *stats)
 {
 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
 	struct rtnl_link_stats64 *percpu_stats;
@@ -1958,7 +1958,7 @@ static const struct dpaa2_eth_hash_fields hash_fields[] = {
 /* Set RX hash options
  * flags is a combination of RXH_ bits
  */
-int dpaa2_eth_set_hash(struct net_device *net_dev, u64 flags)
+static int dpaa2_eth_set_hash(struct net_device *net_dev, u64 flags)
 {
 	struct device *dev = net_dev->dev.parent;
 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
index 55b47623008c..539da71470d9 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
@@ -339,8 +339,6 @@ struct dpaa2_eth_priv {
 extern const struct ethtool_ops dpaa2_ethtool_ops;
 extern const char dpaa2_eth_drv_version[];
 
-int dpaa2_eth_set_hash(struct net_device *net_dev, u64 flags);
-
 static int dpaa2_eth_queue_count(struct dpaa2_eth_priv *priv)
 {
 	return priv->dpni_attrs.num_queues;
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c
index dd0cffa908ef..89888b6115bf 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c
@@ -34,7 +34,7 @@
 #include "dpaa2-eth.h"
 
 /* To be kept in sync with DPNI statistics */
-char dpaa2_ethtool_stats[][ETH_GSTRING_LEN] = {
+static char dpaa2_ethtool_stats[][ETH_GSTRING_LEN] = {
 	"rx frames",
 	"rx bytes",
 	"rx mcast frames",
@@ -56,7 +56,7 @@ char dpaa2_ethtool_stats[][ETH_GSTRING_LEN] = {
 
 #define DPAA2_ETH_NUM_STATS	ARRAY_SIZE(dpaa2_ethtool_stats)
 
-char dpaa2_ethtool_extras[][ETH_GSTRING_LEN] = {
+static char dpaa2_ethtool_extras[][ETH_GSTRING_LEN] = {
 	/* per-cpu stats */
 	"tx conf frames",
 	"tx conf bytes",
-- 
2.11.0

  reply	other threads:[~2017-06-06 15:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06 15:00 [PATCH 00/18] staging: fsl-dpaa2/eth: Code cleanup and minor fixes Ioana Radulescu
2017-06-06 15:00 ` Ioana Radulescu [this message]
2017-06-06 15:00 ` [PATCH 02/18] staging: fsl-dpaa2/eth: Initialize variable before use Ioana Radulescu
2017-06-06 15:00 ` [PATCH 03/18] staging: fsl-dpaa2/eth: Fix return type of ndo_start_xmit Ioana Radulescu
2017-06-06 15:00 ` [PATCH 04/18] staging: fsl-dpaa2/eth: Remove incorrect error path Ioana Radulescu
2017-06-06 15:00 ` [PATCH 05/18] staging: fsl-dpaa2/eth: Add error message newlines Ioana Radulescu
2017-06-06 15:00 ` [PATCH 06/18] staging: fsl-dpaa2/eth: Minor cleanup in dpaa2_eth_set_hash Ioana Radulescu
2017-06-06 15:00 ` [PATCH 07/18] staging: fsl-dpaa2/eth: Don't use GFP_DMA Ioana Radulescu
2017-06-06 15:00 ` [PATCH 08/18] staging: fsl-dpaa2/eth: Always call napi_gro_receive() Ioana Radulescu
2017-06-06 15:00 ` [PATCH 09/18] staging: fsl-dpaa2/eth: Reset dpbp Ioana Radulescu
2017-06-06 15:00 ` [PATCH 10/18] staging: fsl-dpaa2/eth: Defer probing if no DPIOs found Ioana Radulescu
2017-06-06 15:00 ` [PATCH 11/18] staging: fsl-dpaa2/eth: Update ethtool stats names Ioana Radulescu
2017-06-06 15:00 ` [PATCH 12/18] staging: fsl-dpaa2/eth: Add accessor for FAS field Ioana Radulescu
2017-06-06 15:00 ` [PATCH 13/18] staging: fsl-dpaa2/eth: Remove unused fields from priv struct Ioana Radulescu
2017-06-06 15:00 ` [PATCH 14/18] staging: fsl-dpaa2/eth: Only store bpid in " Ioana Radulescu
2017-06-06 15:00 ` [PATCH 15/18] staging: fsl-dpaa2/eth: Reorder priv fields Ioana Radulescu
2017-06-13 10:03   ` Greg KH
2017-06-14 13:09     ` Ruxandra Ioana Radulescu
2017-06-06 15:00 ` [PATCH 16/18] staging: fsl-dpaa2/eth: Errors checking update Ioana Radulescu
2017-06-06 15:24   ` Joe Perches
2017-06-06 15:00 ` [PATCH 17/18] staging: fsl-dpaa2/eth: Refactor MAC address setup Ioana Radulescu
2017-06-06 15:00 ` [PATCH 18/18] staging: fsl-dpaa2/eth: Update number of netdev queues Ioana Radulescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170606150041.10955-2-ruxandra.radulescu@nxp.com \
    --to=ruxandra.radulescu@nxp.com \
    --cc=Bharat.Bhushan@nxp.com \
    --cc=agraf@suse.de \
    --cc=arnd@arndb.de \
    --cc=bogdan.purcareata@nxp.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=laurentiu.tudor@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stuyoder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®