Skip to content

Commit ff2d8d6

Browse files
stephen hemmingerdavem330
authored andcommitted
atlx: make local functions/data static
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0fb1e54 commit ff2d8d6

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

‎drivers/net/atlx/atl1.c‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ MODULE_VERSION(ATLX_DRIVER_VERSION);
9191
/* Temporary hack for merging atl1 and atl2 */
9292
#include "atlx.c"
9393

94+
static const struct ethtool_ops atl1_ethtool_ops;
95+
9496
/*
9597
* This is the only thing that needs to be changed to adjust the
9698
* maximum number of ports that the driver can manage.
@@ -353,7 +355,7 @@ static bool atl1_read_eeprom(struct atl1_hw *hw, u32 offset, u32 *p_value)
353355
* hw - Struct containing variables accessed by shared code
354356
* reg_addr - address of the PHY register to read
355357
*/
356-
s32 atl1_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data)
358+
static s32 atl1_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data)
357359
{
358360
u32 val;
359361
int i;
@@ -553,7 +555,7 @@ static s32 atl1_read_mac_addr(struct atl1_hw *hw)
553555
* 1. calcu 32bit CRC for multicast address
554556
* 2. reverse crc with MSB to LSB
555557
*/
556-
u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr)
558+
static u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr)
557559
{
558560
u32 crc32, value = 0;
559561
int i;
@@ -570,7 +572,7 @@ u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr)
570572
* hw - Struct containing variables accessed by shared code
571573
* hash_value - Multicast address hash value
572574
*/
573-
void atl1_hash_set(struct atl1_hw *hw, u32 hash_value)
575+
static void atl1_hash_set(struct atl1_hw *hw, u32 hash_value)
574576
{
575577
u32 hash_bit, hash_reg;
576578
u32 mta;
@@ -914,7 +916,7 @@ static s32 atl1_get_speed_and_duplex(struct atl1_hw *hw, u16 *speed, u16 *duplex
914916
return 0;
915917
}
916918

917-
void atl1_set_mac_addr(struct atl1_hw *hw)
919+
static void atl1_set_mac_addr(struct atl1_hw *hw)
918920
{
919921
u32 value;
920922
/*
@@ -3658,7 +3660,7 @@ static int atl1_nway_reset(struct net_device *netdev)
36583660
return 0;
36593661
}
36603662

3661-
const struct ethtool_ops atl1_ethtool_ops = {
3663+
static const struct ethtool_ops atl1_ethtool_ops = {
36623664
.get_settings = atl1_get_settings,
36633665
.set_settings = atl1_set_settings,
36643666
.get_drvinfo = atl1_get_drvinfo,

‎drivers/net/atlx/atl1.h‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,13 @@ struct atl1_adapter;
5656
struct atl1_hw;
5757

5858
/* function prototypes needed by multiple files */
59-
u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr);
60-
void atl1_hash_set(struct atl1_hw *hw, u32 hash_value);
61-
s32 atl1_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data);
62-
void atl1_set_mac_addr(struct atl1_hw *hw);
59+
static u32 atl1_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr);
60+
static void atl1_hash_set(struct atl1_hw *hw, u32 hash_value);
61+
static void atl1_set_mac_addr(struct atl1_hw *hw);
6362
static int atl1_mii_ioctl(struct net_device *netdev, struct ifreq *ifr,
6463
int cmd);
6564
static u32 atl1_check_link(struct atl1_adapter *adapter);
6665

67-
extern const struct ethtool_ops atl1_ethtool_ops;
68-
6966
/* hardware definitions specific to L1 */
7067

7168
/* Block IDLE Status Register */

‎drivers/net/atlx/atlx.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141

4242
#include "atlx.h"
4343

44+
static s32 atlx_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data);
45+
static u32 atlx_hash_mc_addr(struct atl1_hw *hw, u8 *mc_addr);
46+
static void atlx_set_mac_addr(struct atl1_hw *hw);
47+
4448
static struct atlx_spi_flash_dev flash_table[] = {
4549
/* MFR_NAME WRSR READ PRGM WREN WRDI RDSR RDID SEC_ERS CHIP_ERS */
4650
{"Atmel", 0x00, 0x03, 0x02, 0x06, 0x04, 0x05, 0x15, 0x52, 0x62},

0 commit comments

Comments
 (0)