atl1: clean up extern, global scope declarations
Subsystems (2)
PATCH 1/1 atl1: clean up extern, global scope declarations
From: Jay Cliburn <[email protected]>
atl1: move extern to header file; make some global code static
Move an extern declaration to a header file. Make needlessly global functions static. Noticed by Adrian Bunk.
Signed-off-by Jay Cliburn <[email protected]>
---
drivers/net/atl1/atl1.h | 1 + drivers/net/atl1/atl1_ethtool.c | 2 +- drivers/net/atl1/atl1_hw.c | 4 ++-- drivers/net/atl1/atl1_main.c | 4 +--- 4 files changed, 5 insertions(+), 6 deletions(-)
drivers/net/atl1/atl1.h +1 -0
@@ -38,6 +38,7 @@ void atl1_free_ring_resources(struct atl1_adapter *adapter);extern char atl1_driver_name[];extern char atl1_driver_version[]; +extern const struct ethtool_ops atl1_ethtool_ops;struct atl1_adapter ;
drivers/net/atl1/atl1_ethtool.c +1 -1
@@ -318,7 +318,7 @@ static void atl1_get_ringparam(struct net_device *netdev, ring->rx_jumbo_pending =0 ; } -static int atl1_set_ringparam (struct net_device *netdev, +static int atl1_set_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring) {struct atl1_adapter *adapter =netdev_priv (netdev);
drivers/net/atl1/atl1_hw.c +2 -2
@@ -206,7 +206,7 @@ static bool atl1_spi_read(struct atl1_hw *hw, u32 addr, u32 *buf)* get_permanent_address * return 0 if get valid mac address, */ -int atl1_get_permanent_address (struct atl1_hw *hw) +static int atl1_get_permanent_address (struct atl1_hw *hw) {u32 addr[2 ];u32 i, control;
@@ -592,7 +592,7 @@ static s32 atl1_setup_link(struct atl1_hw *hw)return ret_val; } -struct atl1_spi_flash_dev flash_table[] = { +static struct atl1_spi_flash_dev flash_table[] = {/* MFR_NAME WRSR READ PRGM WREN WRDI RDSR RDID SECTOR_ERASE CHIP_ERASE */ {"Atmel" ,0x00 ,0x03 ,0x02 ,0x06 ,0x04 ,0x05 ,0x15 ,0x52 ,0x62 }, {"SST" ,0x01 ,0x03 ,0x02 ,0x06 ,0x04 ,0x05 ,0x90 ,0x20 ,0x60 },
drivers/net/atl1/atl1_main.c +1 -3
@@ -96,8 +96,6 @@ MODULE_DESCRIPTION("Attansic 1000M Ethernet Network Driver");MODULE_LICENSE ("GPL" );MODULE_VERSION (DRIVER_VERSION ); -extern struct ethtool_ops atl1_ethtool_ops; -/* * atl1_pci_tbl - PCI Device ID Table */
@@ -1205,7 +1203,7 @@ static u32 atl1_configure(struct atl1_adapter *adapter)* atl1_irq_disable - Mask off interrupt generation on the NIC * @adapter: board private structure */ -void atl1_irq_disable (struct atl1_adapter *adapter) +static void atl1_irq_disable (struct atl1_adapter *adapter) {atomic_inc (&adapter->irq_sem);iowrite32 (0 , adapter->hw.hw_addr +REG_IMR );
Jeff Garzik
AppliedQuoted 8 lines · Jay Cliburn
From: Jay Cliburn <[email protected]>
atl1: move extern to header file; make some global code static
Move an extern declaration to a header file. Make needlessly global functions static. Noticed by Adrian Bunk.
Signed-off-by Jay Cliburn <[email protected]>
applied