Commit ad04e088 authored by Luca Coelho's avatar Luca Coelho

iwlwifi: dvm: make rs_tl_get_load() return void

The return value from this function is never used, so make it return
void to avoid getting the following warning when compiling wiht W=1:

/home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/dvm/rs.c: In function ‘rs_tl_turn_on_agg_for_tid’:
/home/luca/iwlwifi/stack-dev/drivers/net/wireless/intel/iwlwifi/dvm/rs.c:400:6: warning: variable ‘load’ set but not used [-Wunused-but-set-variable]
  u32 load;
      ^
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 3ce4a038
...@@ -364,7 +364,7 @@ static void rs_program_fix_rate(struct iwl_priv *priv, ...@@ -364,7 +364,7 @@ static void rs_program_fix_rate(struct iwl_priv *priv,
/* /*
get the traffic load value for tid get the traffic load value for tid
*/ */
static u32 rs_tl_get_load(struct iwl_lq_sta *lq_data, u8 tid) static void rs_tl_get_load(struct iwl_lq_sta *lq_data, u8 tid)
{ {
u32 curr_time = jiffies_to_msecs(jiffies); u32 curr_time = jiffies_to_msecs(jiffies);
u32 time_diff; u32 time_diff;
...@@ -372,14 +372,14 @@ static u32 rs_tl_get_load(struct iwl_lq_sta *lq_data, u8 tid) ...@@ -372,14 +372,14 @@ static u32 rs_tl_get_load(struct iwl_lq_sta *lq_data, u8 tid)
struct iwl_traffic_load *tl = NULL; struct iwl_traffic_load *tl = NULL;
if (tid >= IWL_MAX_TID_COUNT) if (tid >= IWL_MAX_TID_COUNT)
return 0; return;
tl = &(lq_data->load[tid]); tl = &(lq_data->load[tid]);
curr_time -= curr_time % TID_ROUND_VALUE; curr_time -= curr_time % TID_ROUND_VALUE;
if (!(tl->queue_count)) if (!(tl->queue_count))
return 0; return;
time_diff = TIME_WRAP_AROUND(tl->time_stamp, curr_time); time_diff = TIME_WRAP_AROUND(tl->time_stamp, curr_time);
index = time_diff / TID_QUEUE_CELL_SPACING; index = time_diff / TID_QUEUE_CELL_SPACING;
...@@ -388,8 +388,6 @@ static u32 rs_tl_get_load(struct iwl_lq_sta *lq_data, u8 tid) ...@@ -388,8 +388,6 @@ static u32 rs_tl_get_load(struct iwl_lq_sta *lq_data, u8 tid)
/* TID_MAX_TIME_DIFF */ /* TID_MAX_TIME_DIFF */
if (index >= TID_QUEUE_MAX_SIZE) if (index >= TID_QUEUE_MAX_SIZE)
rs_tl_rm_old_stats(tl, curr_time); rs_tl_rm_old_stats(tl, curr_time);
return tl->total;
} }
static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv, static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
...@@ -397,7 +395,6 @@ static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv, ...@@ -397,7 +395,6 @@ static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
struct ieee80211_sta *sta) struct ieee80211_sta *sta)
{ {
int ret = -EAGAIN; int ret = -EAGAIN;
u32 load;
/* /*
* Don't create TX aggregation sessions when in high * Don't create TX aggregation sessions when in high
...@@ -410,7 +407,7 @@ static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv, ...@@ -410,7 +407,7 @@ static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
return ret; return ret;
} }
load = rs_tl_get_load(lq_data, tid); rs_tl_get_load(lq_data, tid);
IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n", IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n",
sta->addr, tid); sta->addr, tid);
......
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