public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber•org>
To: Giuseppe Cavallaro <peppe.cavallaro@st•com>
Cc: netdev@vger•kernel.org
Subject: [PATCH net-next] stmicro: make local variables static
Date: Mon, 30 Dec 2013 10:38:57 -0800	[thread overview]
Message-ID: <20131230103857.00dee306@nehalam.linuxnetplumber.net> (raw)

Make variables only used in one file static. Also avoids possible
namespace collisions.

Signed-off-by: Stephen Hemminger <stephen@networkplumber•org>


--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h	2013-10-06 14:48:23.770461529 -0700
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h	2013-12-30 10:16:36.348879727 -0800
@@ -108,8 +108,6 @@ struct stmmac_priv {
 	spinlock_t ptp_lock;
 };
 
-extern int phyaddr;
-
 int stmmac_mdio_unregister(struct net_device *ndev);
 int stmmac_mdio_register(struct net_device *ndev);
 void stmmac_set_ethtool_ops(struct net_device *netdev);
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c	2013-12-05 14:47:25.816499656 -0800
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c	2013-12-30 10:16:40.740830166 -0800
@@ -64,7 +64,7 @@ static int debug = -1;
 module_param(debug, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "Message Level (-1: default, 0: no output, 16: all)");
 
-int phyaddr = -1;
+static int phyaddr = -1;
 module_param(phyaddr, int, S_IRUGO);
 MODULE_PARM_DESC(phyaddr, "Physical device address");
 
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c	2013-10-23 21:23:02.984673967 -0700
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c	2013-12-30 10:18:14.451771633 -0800
@@ -26,9 +26,9 @@
 #include <linux/pci.h>
 #include "stmmac.h"
 
-struct plat_stmmacenet_data plat_dat;
-struct stmmac_mdio_bus_data mdio_data;
-struct stmmac_dma_cfg dma_cfg;
+static struct plat_stmmacenet_data plat_dat;
+static struct stmmac_mdio_bus_data mdio_data;
+static struct stmmac_dma_cfg dma_cfg;
 
 static void stmmac_default_data(void)
 {

             reply	other threads:[~2013-12-30 18:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-30 18:38 Stephen Hemminger [this message]
2014-01-02  4:44 ` [PATCH net-next] stmicro: make local variables static David Miller

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=20131230103857.00dee306@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=peppe.cavallaro@st$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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