ixgbe: remove unused functions
Subsystems (2)
PATCH 1/2 ixgbe: remove unused functions
From: Emil Tantilov <[email protected]>
Remove functions that are declared, but not used in the driver. This patch fixes warnings reported by make namespacecheck
Reported by Stephen Hemminger
---
drivers/net/ixgbe/ixgbe_82599.c | 147 ----------------------- drivers/net/ixgbe/ixgbe_common.c | 45 ------- drivers/net/ixgbe/ixgbe_dcb.c | 219 ----------------------------------- drivers/net/ixgbe/ixgbe_dcb.h | 18 --- drivers/net/ixgbe/ixgbe_dcb_82598.c | 59 --------- drivers/net/ixgbe/ixgbe_dcb_82598.h | 4 - drivers/net/ixgbe/ixgbe_dcb_82599.c | 57 --------- drivers/net/ixgbe/ixgbe_dcb_82599.h | 6 - 8 files changed, 0 insertions(+), 555 deletions(-)
drivers/net/ixgbe/ixgbe_82599.c +0 -147
@@ -1415,92 +1415,6 @@ s32 ixgbe_atr_set_dst_ipv4_82599(struct ixgbe_atr_input *input, u32 dst_addr) }/** -* ixgbe_atr_set_src_ipv6_82599 - Sets the source IPv6 address -* @input: input stream to modify -* @src_addr_1: the first 4 bytes of the IP address to load -* @src_addr_2: the second 4 bytes of the IP address to load -* @src_addr_3: the third 4 bytes of the IP address to load -* @src_addr_4: the fourth 4 bytes of the IP address to load -**/ -s32 ixgbe_atr_set_src_ipv6_82599 (struct ixgbe_atr_input *input, -u32 src_addr_1,u32 src_addr_2, -u32 src_addr_3,u32 src_addr_4) -{ - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET ] = src_addr_4 &0xff ; - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +1 ] = - (src_addr_4 >>8 ) &0xff ; - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +2 ] = - (src_addr_4 >>16 ) &0xff ; - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +3 ] = src_addr_4 >>24 ; - - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +4 ] = src_addr_3 &0xff ; - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +5 ] = - (src_addr_3 >>8 ) &0xff ; - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +6 ] = - (src_addr_3 >>16 ) &0xff ; - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +7 ] = src_addr_3 >>24 ; - - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +8 ] = src_addr_2 &0xff ; - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +9 ] = - (src_addr_2 >>8 ) &0xff ; - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +10 ] = - (src_addr_2 >>16 ) &0xff ; - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +11 ] = src_addr_2 >>24 ; - - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +12 ] = src_addr_1 &0xff ; - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +13 ] = - (src_addr_1 >>8 ) &0xff ; - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +14 ] = - (src_addr_1 >>16 ) &0xff ; - input->byte_stream[IXGBE_ATR_SRC_IPV6_OFFSET +15 ] = src_addr_1 >>24 ; - -return 0 ; -} - -/** -* ixgbe_atr_set_dst_ipv6_82599 - Sets the destination IPv6 address -* @input: input stream to modify -* @dst_addr_1: the first 4 bytes of the IP address to load -* @dst_addr_2: the second 4 bytes of the IP address to load -* @dst_addr_3: the third 4 bytes of the IP address to load -* @dst_addr_4: the fourth 4 bytes of the IP address to load -**/ -s32 ixgbe_atr_set_dst_ipv6_82599 (struct ixgbe_atr_input *input, -u32 dst_addr_1,u32 dst_addr_2, -u32 dst_addr_3,u32 dst_addr_4) -{ - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET ] = dst_addr_4 &0xff ; - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +1 ] = - (dst_addr_4 >>8 ) &0xff ; - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +2 ] = - (dst_addr_4 >>16 ) &0xff ; - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +3 ] = dst_addr_4 >>24 ; - - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +4 ] = dst_addr_3 &0xff ; - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +5 ] = - (dst_addr_3 >>8 ) &0xff ; - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +6 ] = - (dst_addr_3 >>16 ) &0xff ; - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +7 ] = dst_addr_3 >>24 ; - - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +8 ] = dst_addr_2 &0xff ; - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +9 ] = - (dst_addr_2 >>8 ) &0xff ; - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +10 ] = - (dst_addr_2 >>16 ) &0xff ; - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +11 ] = dst_addr_2 >>24 ; - - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +12 ] = dst_addr_1 &0xff ; - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +13 ] = - (dst_addr_1 >>8 ) &0xff ; - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +14 ] = - (dst_addr_1 >>16 ) &0xff ; - input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +15 ] = dst_addr_1 >>24 ; - -return 0 ; -} - -/** * ixgbe_atr_set_src_port_82599 - Sets the source port * @input: input stream to modify * @src_port: the source port to load
@@ -1540,19 +1454,6 @@ s32 ixgbe_atr_set_flex_byte_82599(struct ixgbe_atr_input *input, u16 flex_byte) }/** -* ixgbe_atr_set_vm_pool_82599 - Sets the Virtual Machine pool -* @input: input stream to modify -* @vm_pool: the Virtual Machine pool to load -**/ -s32 ixgbe_atr_set_vm_pool_82599 (struct ixgbe_atr_input *input, -u8 vm_pool) -{ - input->byte_stream[IXGBE_ATR_VM_POOL_OFFSET ] = vm_pool; - -return 0 ; -} - -/** * ixgbe_atr_set_l4type_82599 - Sets the layer 4 packet type * @input: input stream to modify * @l4type: the layer 4 type value to load
@@ -1645,41 +1546,6 @@ static s32 ixgbe_atr_get_src_ipv6_82599(struct ixgbe_atr_input *input, }/** -* ixgbe_atr_get_dst_ipv6_82599 - Gets the destination IPv6 address -* @input: input stream to search -* @dst_addr_1: the first 4 bytes of the IP address to load -* @dst_addr_2: the second 4 bytes of the IP address to load -* @dst_addr_3: the third 4 bytes of the IP address to load -* @dst_addr_4: the fourth 4 bytes of the IP address to load -**/ -s32 ixgbe_atr_get_dst_ipv6_82599 (struct ixgbe_atr_input *input, -u32 *dst_addr_1,u32 *dst_addr_2, -u32 *dst_addr_3,u32 *dst_addr_4) -{ - *dst_addr_1 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +12 ]; - *dst_addr_1 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +13 ] <<8 ; - *dst_addr_1 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +14 ] <<16 ; - *dst_addr_1 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +15 ] <<24 ; - - *dst_addr_2 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +8 ]; - *dst_addr_2 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +9 ] <<8 ; - *dst_addr_2 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +10 ] <<16 ; - *dst_addr_2 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +11 ] <<24 ; - - *dst_addr_3 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +4 ]; - *dst_addr_3 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +5 ] <<8 ; - *dst_addr_3 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +6 ] <<16 ; - *dst_addr_3 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +7 ] <<24 ; - - *dst_addr_4 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET ]; - *dst_addr_4 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +1 ] <<8 ; - *dst_addr_4 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +2 ] <<16 ; - *dst_addr_4 = input->byte_stream[IXGBE_ATR_DST_IPV6_OFFSET +3 ] <<24 ; - -return 0 ; -} - -/** * ixgbe_atr_get_src_port_82599 - Gets the source port * @input: input stream to modify * @src_port: the source port to load
@@ -1732,19 +1598,6 @@ static s32 ixgbe_atr_get_flex_byte_82599(struct ixgbe_atr_input *input, }/** -* ixgbe_atr_get_vm_pool_82599 - Gets the Virtual Machine pool -* @input: input stream to modify -* @vm_pool: the Virtual Machine pool to load -**/ -s32 ixgbe_atr_get_vm_pool_82599 (struct ixgbe_atr_input *input, -u8 *vm_pool) -{ - *vm_pool = input->byte_stream[IXGBE_ATR_VM_POOL_OFFSET ]; - -return 0 ; -} - -/** * ixgbe_atr_get_l4type_82599 - Gets the layer 4 packet type * @input: input stream to modify * @l4type: the layer 4 type value to load
drivers/net/ixgbe/ixgbe_common.c +0 -45
48 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_dcb.c +0 -219
231 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_dcb.h +0 -18
@@ -149,27 +149,9 @@ struct ixgbe_dcb_config {/* DCB driver APIs */ -/* DCB rule checking function.*/ -s32 ixgbe_dcb_check_config (struct ixgbe_dcb_config *config); -/* DCB credits calculation */ s32 ixgbe_dcb_calculate_tc_credits (struct ixgbe_dcb_config *,u8 ); -/* DCB PFC functions */ -s32 ixgbe_dcb_config_pfc (struct ixgbe_hw *,struct ixgbe_dcb_config *g); -s32 ixgbe_dcb_get_pfc_stats (struct ixgbe_hw *,struct ixgbe_hw_stats *,u8 ); - -/* DCB traffic class stats */ -s32 ixgbe_dcb_config_tc_stats (struct ixgbe_hw *); -s32 ixgbe_dcb_get_tc_stats (struct ixgbe_hw *,struct ixgbe_hw_stats *,u8 ); - -/* DCB config arbiters */ -s32 ixgbe_dcb_config_tx_desc_arbiter (struct ixgbe_hw *, -struct ixgbe_dcb_config *); -s32 ixgbe_dcb_config_tx_data_arbiter (struct ixgbe_hw *, -struct ixgbe_dcb_config *); -s32 ixgbe_dcb_config_rx_arbiter (struct ixgbe_hw *,struct ixgbe_dcb_config *); -/* DCB hw initialization */ s32 ixgbe_dcb_hw_config (struct ixgbe_hw *,struct ixgbe_dcb_config *);
drivers/net/ixgbe/ixgbe_dcb_82598.c +0 -59
65 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_dcb_82598.h +0 -4
@@ -72,13 +72,9 @@/* DCB PFC functions */ s32 ixgbe_dcb_config_pfc_82598 (struct ixgbe_hw *,struct ixgbe_dcb_config *); -s32 ixgbe_dcb_get_pfc_stats_82598 (struct ixgbe_hw *,struct ixgbe_hw_stats *, -u8 );/* DCB traffic class stats */ s32 ixgbe_dcb_config_tc_stats_82598 (struct ixgbe_hw *); -s32 ixgbe_dcb_get_tc_stats_82598 (struct ixgbe_hw *,struct ixgbe_hw_stats *, -u8 );/* DCB config arbiters */ s32 ixgbe_dcb_config_tx_desc_arbiter_82598(struct ixgbe_hw *,
drivers/net/ixgbe/ixgbe_dcb_82599.c +0 -57
63 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_dcb_82599.h +0 -6
@@ -101,15 +101,9 @@/* DCB PFC functions */ s32 ixgbe_dcb_config_pfc_82599 (struct ixgbe_hw *hw,struct ixgbe_dcb_config *dcb_config); -s32 ixgbe_dcb_get_pfc_stats_82599 (struct ixgbe_hw *hw, -struct ixgbe_hw_stats *stats, -u8 tc_count);/* DCB traffic class stats */ s32 ixgbe_dcb_config_tc_stats_82599 (struct ixgbe_hw *hw); -s32 ixgbe_dcb_get_tc_stats_82599 (struct ixgbe_hw *hw, -struct ixgbe_hw_stats *stats, -u8 tc_count);/* DCB config arbiters */ s32 ixgbe_dcb_config_tx_desc_arbiter_82599(struct ixgbe_hw *hw,
PATCH 2/2 ixgbe: declare functions as static
From: Emil Tantilov <[email protected]>
Following patch fixes warnings reported by make namespacecheck
Reported by Stephen Hemminger
---
drivers/net/ixgbe/ixgbe_82599.c | 30 +++++++++++++++--------------- drivers/net/ixgbe/ixgbe_common.c | 5 +++-- drivers/net/ixgbe/ixgbe_common.h | 1 - drivers/net/ixgbe/ixgbe_dcb_82598.c | 8 ++++---- drivers/net/ixgbe/ixgbe_dcb_82598.h | 11 ----------- drivers/net/ixgbe/ixgbe_dcb_82599.c | 12 ++++++------ drivers/net/ixgbe/ixgbe_dcb_82599.h | 12 ------------ drivers/net/ixgbe/ixgbe_mbx.c | 19 +++---------------- drivers/net/ixgbe/ixgbe_mbx.h | 3 --- drivers/net/ixgbe/ixgbe_sriov.c | 17 +++++++++-------- drivers/net/ixgbe/ixgbe_sriov.h | 8 -------- 11 files changed, 40 insertions(+), 86 deletions(-)
drivers/net/ixgbe/ixgbe_82599.c +15 -15
@@ -39,20 +39,20 @@#define IXGBE_82599_MC_TBL_SIZE 128#define IXGBE_82599_VFT_TBL_SIZE 128 -void ixgbe_disable_tx_laser_multispeed_fiber (struct ixgbe_hw *hw); -void ixgbe_enable_tx_laser_multispeed_fiber (struct ixgbe_hw *hw); -void ixgbe_flap_tx_laser_multispeed_fiber (struct ixgbe_hw *hw); -s32 ixgbe_setup_mac_link_multispeed_fiber (struct ixgbe_hw *hw, -ixgbe_link_speed speed, -bool autoneg, -bool autoneg_wait_to_complete); +static void ixgbe_disable_tx_laser_multispeed_fiber (struct ixgbe_hw *hw); +static void ixgbe_enable_tx_laser_multispeed_fiber (struct ixgbe_hw *hw); +static void ixgbe_flap_tx_laser_multispeed_fiber (struct ixgbe_hw *hw); +static s32 ixgbe_setup_mac_link_multispeed_fiber (struct ixgbe_hw *hw, +ixgbe_link_speed speed, +bool autoneg, +bool autoneg_wait_to_complete);static s32 ixgbe_setup_mac_link_smartspeed (struct ixgbe_hw *hw,ixgbe_link_speed speed,bool autoneg,bool autoneg_wait_to_complete); -s32 ixgbe_start_mac_link_82599 (struct ixgbe_hw *hw, -bool autoneg_wait_to_complete); -s32 ixgbe_setup_mac_link_82599 (struct ixgbe_hw *hw, +static s32 ixgbe_start_mac_link_82599 (struct ixgbe_hw *hw, +bool autoneg_wait_to_complete); +static s32 ixgbe_setup_mac_link_82599 (struct ixgbe_hw *hw,ixgbe_link_speed speed,bool autoneg,bool autoneg_wait_to_complete);
@@ -369,7 +369,7 @@ out:* Configures link settings based on values in the ixgbe_hw struct. * Restarts the link. Performs autonegotiation if needed. **/ -s32 ixgbe_start_mac_link_82599 (struct ixgbe_hw *hw, +static s32 ixgbe_start_mac_link_82599 (struct ixgbe_hw *hw,bool autoneg_wait_to_complete) {u32 autoc_reg;
@@ -418,7 +418,7 @@ s32 ixgbe_start_mac_link_82599(struct ixgbe_hw *hw,* PHY states. This includes selectively shutting down the Tx * laser on the PHY, effectively halting physical link. **/ -void ixgbe_disable_tx_laser_multispeed_fiber (struct ixgbe_hw *hw) +static void ixgbe_disable_tx_laser_multispeed_fiber (struct ixgbe_hw *hw) {u32 esdp_reg =IXGBE_READ_REG (hw,IXGBE_ESDP );
@@ -437,7 +437,7 @@ void ixgbe_disable_tx_laser_multispeed_fiber(struct ixgbe_hw *hw)* PHY states. This includes selectively turning on the Tx * laser on the PHY, effectively starting physical link. **/ -void ixgbe_enable_tx_laser_multispeed_fiber (struct ixgbe_hw *hw) +static void ixgbe_enable_tx_laser_multispeed_fiber (struct ixgbe_hw *hw) {u32 esdp_reg =IXGBE_READ_REG (hw,IXGBE_ESDP );
@@ -460,7 +460,7 @@ void ixgbe_enable_tx_laser_multispeed_fiber(struct ixgbe_hw *hw)* end. This is consistent with true clause 37 autoneg, which also * involves a loss of signal. **/ -void ixgbe_flap_tx_laser_multispeed_fiber (struct ixgbe_hw *hw) +static void ixgbe_flap_tx_laser_multispeed_fiber (struct ixgbe_hw *hw) {hw_dbg (hw,"ixgbe_flap_tx_laser_multispeed_fiber\n" );
@@ -729,7 +729,7 @@ out:* * Set the link speed in the AUTOC register and restarts link. **/ -s32 ixgbe_setup_mac_link_82599 (struct ixgbe_hw *hw, +static s32 ixgbe_setup_mac_link_82599 (struct ixgbe_hw *hw,ixgbe_link_speed speed,bool autoneg,bool autoneg_wait_to_complete) {
drivers/net/ixgbe/ixgbe_common.c +3 -2
@@ -52,6 +52,7 @@ static void ixgbe_disable_rar(struct ixgbe_hw *hw, u32 index);static s32 ixgbe_mta_vector (struct ixgbe_hw *hw,u8 *mc_addr);static void ixgbe_add_uc_addr (struct ixgbe_hw *hw,u8 *addr,u32 vmdq);static s32 ixgbe_setup_fc (struct ixgbe_hw *hw,s32 packetbuf_num); +static s32 ixgbe_poll_eerd_eewr_done (struct ixgbe_hw *hw,u32 ee_reg);/** * ixgbe_start_hw_generic - Prepare hardware for Tx/Rx
@@ -637,7 +638,7 @@ out:* Polls the status bit (bit 1) of the EERD or EEWR to determine when the * read or write is done respectively. **/ -s32 ixgbe_poll_eerd_eewr_done (struct ixgbe_hw *hw,u32 ee_reg) +static s32 ixgbe_poll_eerd_eewr_done (struct ixgbe_hw *hw,u32 ee_reg) {u32 i;u32 reg;
@@ -2449,7 +2450,7 @@ s32 ixgbe_init_uta_tables_generic(struct ixgbe_hw *hw)* return the VLVF index where this VLAN id should be placed * **/ -s32 ixgbe_find_vlvf_slot (struct ixgbe_hw *hw,u32 vlan) +static s32 ixgbe_find_vlvf_slot (struct ixgbe_hw *hw,u32 vlan) {u32 bits =0 ;u32 first_empty_slot =0 ;
drivers/net/ixgbe/ixgbe_common.h +0 -1
@@ -52,7 +52,6 @@ s32 ixgbe_read_eeprom_bit_bang_generic(struct ixgbe_hw *hw, u16 offset,s32 ixgbe_validate_eeprom_checksum_generic (struct ixgbe_hw *hw,u16 *checksum_val);s32 ixgbe_update_eeprom_checksum_generic (struct ixgbe_hw *hw); -s32 ixgbe_poll_eerd_eewr_done (struct ixgbe_hw *hw,u32 ee_reg);s32 ixgbe_set_rar_generic (struct ixgbe_hw *hw,u32 index,u8 *addr,u32 vmdq,u32 enable_addr);
drivers/net/ixgbe/ixgbe_dcb_82598.c +4 -4
@@ -78,7 +78,7 @@ static s32 ixgbe_dcb_config_packet_buffers_82598(struct ixgbe_hw *hw,* * Configure Rx Data Arbiter and credits for each traffic class. */ -s32 ixgbe_dcb_config_rx_arbiter_82598 (struct ixgbe_hw *hw, +static s32 ixgbe_dcb_config_rx_arbiter_82598 (struct ixgbe_hw *hw,struct ixgbe_dcb_config *dcb_config) {struct tc_bw_alloc *p;
@@ -135,7 +135,7 @@ s32 ixgbe_dcb_config_rx_arbiter_82598(struct ixgbe_hw *hw,* * Configure Tx Descriptor Arbiter and credits for each traffic class. */ -s32 ixgbe_dcb_config_tx_desc_arbiter_82598 (struct ixgbe_hw *hw, +static s32 ixgbe_dcb_config_tx_desc_arbiter_82598 (struct ixgbe_hw *hw,struct ixgbe_dcb_config *dcb_config) {struct tc_bw_alloc *p;
@@ -183,7 +183,7 @@ s32 ixgbe_dcb_config_tx_desc_arbiter_82598(struct ixgbe_hw *hw,* * Configure Tx Data Arbiter and credits for each traffic class. */ -s32 ixgbe_dcb_config_tx_data_arbiter_82598 (struct ixgbe_hw *hw, +static s32 ixgbe_dcb_config_tx_data_arbiter_82598 (struct ixgbe_hw *hw,struct ixgbe_dcb_config *dcb_config) {struct tc_bw_alloc *p;
@@ -296,7 +296,7 @@ out:* Configure queue statistics registers, all queues belonging to same traffic * class uses a single set of queue statistics counters. */ -s32 ixgbe_dcb_config_tc_stats_82598 (struct ixgbe_hw *hw) +static s32 ixgbe_dcb_config_tc_stats_82598 (struct ixgbe_hw *hw) {u32 reg =0 ;u8 i =0 ;
drivers/net/ixgbe/ixgbe_dcb_82598.h +0 -11
@@ -73,17 +73,6 @@/* DCB PFC functions */ s32 ixgbe_dcb_config_pfc_82598 (struct ixgbe_hw *,struct ixgbe_dcb_config *); -/* DCB traffic class stats */ -s32 ixgbe_dcb_config_tc_stats_82598 (struct ixgbe_hw *); - -/* DCB config arbiters */ -s32 ixgbe_dcb_config_tx_desc_arbiter_82598 (struct ixgbe_hw *, -struct ixgbe_dcb_config *); -s32 ixgbe_dcb_config_tx_data_arbiter_82598 (struct ixgbe_hw *, -struct ixgbe_dcb_config *); -s32 ixgbe_dcb_config_rx_arbiter_82598 (struct ixgbe_hw *, -struct ixgbe_dcb_config *); -/* DCB hw initialization */ s32 ixgbe_dcb_hw_config_82598 (struct ixgbe_hw *,struct ixgbe_dcb_config *);
drivers/net/ixgbe/ixgbe_dcb_82599.c +6 -6
@@ -37,7 +37,7 @@* * Configure packet buffers for DCB mode. */ -s32 ixgbe_dcb_config_packet_buffers_82599 (struct ixgbe_hw *hw, +static s32 ixgbe_dcb_config_packet_buffers_82599 (struct ixgbe_hw *hw,struct ixgbe_dcb_config *dcb_config) {s32 ret_val =0 ;
@@ -79,7 +79,7 @@ s32 ixgbe_dcb_config_packet_buffers_82599(struct ixgbe_hw *hw,* * Configure Rx Packet Arbiter and credits for each traffic class. */ -s32 ixgbe_dcb_config_rx_arbiter_82599 (struct ixgbe_hw *hw, +static s32 ixgbe_dcb_config_rx_arbiter_82599 (struct ixgbe_hw *hw,struct ixgbe_dcb_config *dcb_config) {struct tc_bw_alloc *p;
@@ -134,7 +134,7 @@ s32 ixgbe_dcb_config_rx_arbiter_82599(struct ixgbe_hw *hw,* * Configure Tx Descriptor Arbiter and credits for each traffic class. */ -s32 ixgbe_dcb_config_tx_desc_arbiter_82599 (struct ixgbe_hw *hw, +static s32 ixgbe_dcb_config_tx_desc_arbiter_82599 (struct ixgbe_hw *hw,struct ixgbe_dcb_config *dcb_config) {struct tc_bw_alloc *p;
@@ -181,7 +181,7 @@ s32 ixgbe_dcb_config_tx_desc_arbiter_82599(struct ixgbe_hw *hw,* * Configure Tx Packet Arbiter and credits for each traffic class. */ -s32 ixgbe_dcb_config_tx_data_arbiter_82599 (struct ixgbe_hw *hw, +static s32 ixgbe_dcb_config_tx_data_arbiter_82599 (struct ixgbe_hw *hw,struct ixgbe_dcb_config *dcb_config) {struct tc_bw_alloc *p;
@@ -302,7 +302,7 @@ out:* Configure queue statistics registers, all queues belonging to same traffic * class uses a single set of queue statistics counters. */ -s32 ixgbe_dcb_config_tc_stats_82599 (struct ixgbe_hw *hw) +static s32 ixgbe_dcb_config_tc_stats_82599 (struct ixgbe_hw *hw) {u32 reg =0 ;u8 i =0 ;
@@ -355,7 +355,7 @@ s32 ixgbe_dcb_config_tc_stats_82599(struct ixgbe_hw *hw)* * Configure general DCB parameters. */ -s32 ixgbe_dcb_config_82599 (struct ixgbe_hw *hw) +static s32 ixgbe_dcb_config_82599 (struct ixgbe_hw *hw) {u32 reg;u32 q;
drivers/net/ixgbe/ixgbe_dcb_82599.h +0 -12
@@ -102,18 +102,6 @@s32 ixgbe_dcb_config_pfc_82599 (struct ixgbe_hw *hw,struct ixgbe_dcb_config *dcb_config); -/* DCB traffic class stats */ -s32 ixgbe_dcb_config_tc_stats_82599 (struct ixgbe_hw *hw); - -/* DCB config arbiters */ -s32 ixgbe_dcb_config_tx_desc_arbiter_82599 (struct ixgbe_hw *hw, -struct ixgbe_dcb_config *dcb_config); -s32 ixgbe_dcb_config_tx_data_arbiter_82599 (struct ixgbe_hw *hw, -struct ixgbe_dcb_config *dcb_config); -s32 ixgbe_dcb_config_rx_arbiter_82599 (struct ixgbe_hw *hw, -struct ixgbe_dcb_config *dcb_config); - -/* DCB hw initialization */ s32 ixgbe_dcb_hw_config_82599 (struct ixgbe_hw *hw,struct ixgbe_dcb_config *config);
drivers/net/ixgbe/ixgbe_mbx.c +3 -16
@@ -200,7 +200,8 @@ out:* returns SUCCESS if it successfully received a message notification and * copied it into the receive buffer. **/ -s32 ixgbe_read_posted_mbx (struct ixgbe_hw *hw,u32 *msg,u16 size,u16 mbx_id) +static s32 ixgbe_read_posted_mbx (struct ixgbe_hw *hw,u32 *msg,u16 size, +u16 mbx_id) {struct ixgbe_mbx_info *mbx = &hw->mbx;s32 ret_val =IXGBE_ERR_MBX ;
@@ -227,7 +228,7 @@ out:* returns SUCCESS if it successfully copied message into the buffer and * received an ack to that message within delay * timeout period **/ -s32 ixgbe_write_posted_mbx (struct ixgbe_hw *hw,u32 *msg,u16 size, +static s32 ixgbe_write_posted_mbx (struct ixgbe_hw *hw,u32 *msg,u16 size,u16 mbx_id) {struct ixgbe_mbx_info *mbx = &hw->mbx;
@@ -247,20 +248,6 @@ out:return ret_val; } -/** -* ixgbe_init_mbx_ops_generic - Initialize MB function pointers -* @hw: pointer to the HW structure -* -* Setup the mailbox read and write message function pointers -**/ -void ixgbe_init_mbx_ops_generic (struct ixgbe_hw *hw) -{ -struct ixgbe_mbx_info *mbx = &hw->mbx; - - mbx->ops.read_posted = ixgbe_read_posted_mbx; - mbx->ops.write_posted = ixgbe_write_posted_mbx; -} -static s32 ixgbe_check_for_bit_pf (struct ixgbe_hw *hw,u32 mask,s32 index) {u32 mbvficr =IXGBE_READ_REG (hw,IXGBE_MBVFICR (index));
drivers/net/ixgbe/ixgbe_mbx.h +0 -3
@@ -83,12 +83,9 @@s32 ixgbe_read_mbx (struct ixgbe_hw *,u32 *,u16 ,u16 );s32 ixgbe_write_mbx (struct ixgbe_hw *,u32 *,u16 ,u16 ); -s32 ixgbe_read_posted_mbx (struct ixgbe_hw *,u32 *,u16 ,u16 ); -s32 ixgbe_write_posted_mbx (struct ixgbe_hw *,u32 *,u16 ,u16 );s32 ixgbe_check_for_msg (struct ixgbe_hw *,u16 );s32 ixgbe_check_for_ack (struct ixgbe_hw *,u16 );s32 ixgbe_check_for_rst (struct ixgbe_hw *,u16 ); -void ixgbe_init_mbx_ops_generic (struct ixgbe_hw *hw);void ixgbe_init_mbx_params_pf (struct ixgbe_hw *);extern struct ixgbe_mbx_operations mbx_ops_82599;
drivers/net/ixgbe/ixgbe_sriov.c +9 -8
@@ -43,8 +43,8 @@#include "ixgbe_sriov.h" -int ixgbe_set_vf_multicasts (struct ixgbe_adapter *adapter, -int entries,u16 *hash_list,u32 vf) +static int ixgbe_set_vf_multicasts (struct ixgbe_adapter *adapter, +int entries,u16 *hash_list,u32 vf) {struct vf_data_storage *vfinfo = &adapter->vfinfo[vf];struct ixgbe_hw *hw = &adapter->hw;
@@ -104,13 +104,14 @@ void ixgbe_restore_vf_multicasts(struct ixgbe_adapter *adapter) } } -int ixgbe_set_vf_vlan (struct ixgbe_adapter *adapter,int add,int vid,u32 vf) +static int ixgbe_set_vf_vlan (struct ixgbe_adapter *adapter,int add,int vid, +u32 vf) {return adapter->hw.mac.ops.set_vfta (&adapter->hw, vid, vf, (bool )add); } -void ixgbe_set_vmolr (struct ixgbe_hw *hw,u32 vf,bool aupe) +static void ixgbe_set_vmolr (struct ixgbe_hw *hw,u32 vf,bool aupe) {u32 vmolr =IXGBE_READ_REG (hw,IXGBE_VMOLR (vf)); vmolr |= (IXGBE_VMOLR_ROMPE |
@@ -134,7 +135,7 @@ static void ixgbe_set_vmvir(struct ixgbe_adapter *adapter, u32 vid, u32 vf)IXGBE_WRITE_REG (hw,IXGBE_VMVIR (vf),0 ); } -inline void ixgbe_vf_reset_event (struct ixgbe_adapter *adapter,u32 vf) +static inline void ixgbe_vf_reset_event (struct ixgbe_adapter *adapter,u32 vf) {struct ixgbe_hw *hw = &adapter->hw;int rar_entry = hw->mac.num_rar_entries - (vf +1 );
@@ -162,8 +163,8 @@ inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf) hw->mac.ops.clear_rar (hw, rar_entry); } -int ixgbe_set_vf_mac (struct ixgbe_adapter *adapter, -int vf,unsigned char *mac_addr) +static int ixgbe_set_vf_mac (struct ixgbe_adapter *adapter, +int vf,unsigned char *mac_addr) {struct ixgbe_hw *hw = &adapter->hw;int rar_entry = hw->mac.num_rar_entries - (vf +1 );
@@ -197,7 +198,7 @@ int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask)return 0 ; } -inline void ixgbe_vf_reset_msg (struct ixgbe_adapter *adapter,u32 vf) +static inline void ixgbe_vf_reset_msg (struct ixgbe_adapter *adapter,u32 vf) {struct ixgbe_hw *hw = &adapter->hw;u32 reg;
drivers/net/ixgbe/ixgbe_sriov.h +0 -8
@@ -28,16 +28,8 @@#ifndef _IXGBE_SRIOV_H_#define _IXGBE_SRIOV_H_ -int ixgbe_set_vf_multicasts (struct ixgbe_adapter *adapter, -int entries,u16 *hash_list,u32 vf);void ixgbe_restore_vf_multicasts (struct ixgbe_adapter *adapter); -int ixgbe_set_vf_vlan (struct ixgbe_adapter *adapter,int add,int vid,u32 vf); -void ixgbe_set_vmolr (struct ixgbe_hw *hw,u32 vf,bool aupe); -void ixgbe_vf_reset_event (struct ixgbe_adapter *adapter,u32 vf); -void ixgbe_vf_reset_msg (struct ixgbe_adapter *adapter,u32 vf);void ixgbe_msg_task (struct ixgbe_adapter *adapter); -int ixgbe_set_vf_mac (struct ixgbe_adapter *adapter, -int vf,unsigned char *mac_addr);int ixgbe_vf_configuration (struct pci_dev *pdev,unsigned int event_mask);void ixgbe_disable_tx_rx (struct ixgbe_adapter *adapter);void ixgbe_ping_all_vfs (struct ixgbe_adapter *adapter);
Re: [net-next-2.6 PATCH 2/2] ixgbe: declare functions as static
From: Jeff Kirsher <[email protected]>
Date: Wed, 13 Oct 2010 01:20:59 -0700
Quoted 10 lines
From: Emil Tantilov <[email protected]>
Following patch fixes warnings reported by
make namespacecheckReported by Stephen Hemminger
CC Stephen Hemminger <[email protected]>Signed-off-by Emil Tantilov <[email protected]>Tested-by Stephen Ko <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.
From: Jeff Kirsher <[email protected]>
Date: Wed, 13 Oct 2010 01:20:34 -0700
Quoted 11 lines
From: Emil Tantilov <[email protected]>
Remove functions that are declared, but not used in the driver. This patch fixes warnings reported by
make namespacecheckReported by Stephen Hemminger
CC Stephen Hemminger <[email protected]>Signed-off-by Emil Tantilov <[email protected]>Tested-by Stephen Ko <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.