Commit 49c65e95 authored by Jason Yan's avatar Jason Yan Committed by Jeff Kirsher

igb: make igb_set_fc_watermarks() return void

This function always return 0 now, we can make it return void to
simplify the code. This fixes the following coccicheck warning:

drivers/net/ethernet/intel/igb/e1000_mac.c:728:5-12: Unneeded variable:
"ret_val". Return "0" on line 751
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent f2d9f294
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "igb.h" #include "igb.h"
static s32 igb_set_default_fc(struct e1000_hw *hw); static s32 igb_set_default_fc(struct e1000_hw *hw);
static s32 igb_set_fc_watermarks(struct e1000_hw *hw); static void igb_set_fc_watermarks(struct e1000_hw *hw);
/** /**
* igb_get_bus_info_pcie - Get PCIe bus information * igb_get_bus_info_pcie - Get PCIe bus information
...@@ -687,7 +687,7 @@ s32 igb_setup_link(struct e1000_hw *hw) ...@@ -687,7 +687,7 @@ s32 igb_setup_link(struct e1000_hw *hw)
wr32(E1000_FCTTV, hw->fc.pause_time); wr32(E1000_FCTTV, hw->fc.pause_time);
ret_val = igb_set_fc_watermarks(hw); igb_set_fc_watermarks(hw);
out: out:
...@@ -723,9 +723,8 @@ void igb_config_collision_dist(struct e1000_hw *hw) ...@@ -723,9 +723,8 @@ void igb_config_collision_dist(struct e1000_hw *hw)
* flow control XON frame transmission is enabled, then set XON frame * flow control XON frame transmission is enabled, then set XON frame
* tansmission as well. * tansmission as well.
**/ **/
static s32 igb_set_fc_watermarks(struct e1000_hw *hw) static void igb_set_fc_watermarks(struct e1000_hw *hw)
{ {
s32 ret_val = 0;
u32 fcrtl = 0, fcrth = 0; u32 fcrtl = 0, fcrth = 0;
/* Set the flow control receive threshold registers. Normally, /* Set the flow control receive threshold registers. Normally,
...@@ -747,8 +746,6 @@ static s32 igb_set_fc_watermarks(struct e1000_hw *hw) ...@@ -747,8 +746,6 @@ static s32 igb_set_fc_watermarks(struct e1000_hw *hw)
} }
wr32(E1000_FCRTL, fcrtl); wr32(E1000_FCRTL, fcrtl);
wr32(E1000_FCRTH, fcrth); wr32(E1000_FCRTH, fcrth);
return ret_val;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment