i40e: make functions static and remove dead code
Subsystems (3)
PATCH 1/1 i40e: make functions static and remove dead code
Make local functions static in the file they are used.
Remove functions i40e_aq_add_vlan and i40e_aq_remove_vlan since they are not used anywhere by current code.
Compile tested only.
--- drivers/net/ethernet/intel/i40e/i40e_adminq.c | 6 + drivers/net/ethernet/intel/i40e/i40e_common.c | 80 ----------------------- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 8 -- 3 files changed, 4 insertions(+), 90 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_adminq.c +4 -2
@@ -31,6 +31,8 @@#include "i40e_adminq.h" #include "i40e_prototype.h" +static void i40e_resume_aq (struct i40e_hw *hw); +/** * i40e_adminq_init_regs - Initialize AdminQ registers * @hw: pointer to the hardware structure
@@ -675,7 +677,7 @@ static u16 i40e_clean_asq(struct i40e_hw* Returns true if the firmware has processed all descriptors on the * admin send queue. Returns false if there are still requests pending. **/ -bool i40e_asq_done (struct i40e_hw *hw) +static bool i40e_asq_done (struct i40e_hw *hw) {/* AQ designers suggest use of head for better * timing reliability than DD bit
@@ -963,7 +965,7 @@ clean_arq_element_out:return ret_code; } -void i40e_resume_aq (struct i40e_hw *hw) +static void i40e_resume_aq (struct i40e_hw *hw) {u32 reg =0 ;
drivers/net/ethernet/intel/i40e/i40e_common.c +0 -80
86 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_prototype.h +0 -8
@@ -51,7 +51,6 @@ i40e_status i40e_asq_send_command(structvoid *buff,/* can be NULL */ u16 buff_size, struct i40e_asq_cmd_details *cmd_details); -bool i40e_asq_done (struct i40e_hw *hw);/* debug function for adminq */ void i40e_debug_aq(struct i40e_hw *hw,
@@ -60,7 +59,6 @@ void i40e_debug_aq(struct i40e_hw *hw, void *buffer);void i40e_idle_aq (struct i40e_hw *hw); -void i40e_resume_aq (struct i40e_hw *hw);u32 i40e_led_get (struct i40e_hw *hw);void i40e_led_set (struct i40e_hw *hw,u32 mode);
@@ -120,12 +118,6 @@ i40e_status i40e_aq_add_macvlan(struct ii40e_status i40e_aq_remove_macvlan (struct i40e_hw *hw,u16 vsi_id,struct i40e_aqc_remove_macvlan_element_data *mv_list,u16 count,struct i40e_asq_cmd_details *cmd_details); -i40e_status i40e_aq_add_vlan (struct i40e_hw *hw,u16 vsi_id, -struct i40e_aqc_add_remove_vlan_element_data *v_list, -u8 count,struct i40e_asq_cmd_details *cmd_details); -i40e_status i40e_aq_remove_vlan (struct i40e_hw *hw,u16 vsi_id, -struct i40e_aqc_add_remove_vlan_element_data *v_list, -u8 count,struct i40e_asq_cmd_details *cmd_details);i40e_status i40e_aq_send_msg_to_vf (struct i40e_hw *hw,u16 vfid,u32 v_opcode,u32 v_retval,u8 *msg,u16 msglen,struct i40e_asq_cmd_details *cmd_details);
Quoted 11 lines · Stephen Hemminger
Make local functions static in the file they are used.
Remove functions
i40e_aq_add_vlanandi40e_aq_remove_vlansince they are not used anywhere by current code.Compile tested only.
Signed-off-by Stephen Hemminger <[email protected]>
Quoted 6 lines
--- drivers/net/ethernet/intel/i40e/i40e_adminq.c | 6 + drivers/net/ethernet/intel/i40e/i40e_common.c | 80 ----------------------- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 8 -- 3 files changed, 4 insertions(+), 90 deletions(-)
Thanks Stephen, currently I have nearly 80 i40e patches in my queue right now which may take advantage of these functions. If not, I will add your patch to my queue. I am hoping to get all these patches for i40e out over the next couple of weeks, so if there are patches in my queue that will take advantage of these functions, they will be pushed soon.