Skip to content

Commit

Permalink
stmicro: make local variables static
Browse files Browse the repository at this point in the history
Make variables only used in one file static. Also avoids possible
namespace collisions.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
stephen hemminger authored and David S. Miller committed Jan 2, 2014
1 parent 8e76978 commit 47d1f71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ethernet/stmicro/stmmac/stmmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
6 changes: 3 additions & 3 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 47d1f71

Please sign in to comment.