Skip to content

Commit

Permalink
ath6kl: wmi: Remove unused variable 'rate'
Browse files Browse the repository at this point in the history
Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ath/ath6kl/wmi.c: In function ‘ath6kl_wmi_bitrate_reply_rx’:
 drivers/net/wireless/ath/ath6kl/wmi.c:1204:6: warning: variable ‘rate’ set but not used [-Wunused-but-set-variable]

Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200826093401.1458456-15-lee.jones@linaro.org
  • Loading branch information
Lee Jones authored and Kalle Valo committed Aug 27, 2020
1 parent c068a9e commit e585184
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/net/wireless/ath/ath6kl/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1201,8 +1201,7 @@ static int ath6kl_wmi_pstream_timeout_event_rx(struct wmi *wmi, u8 *datap,
static int ath6kl_wmi_bitrate_reply_rx(struct wmi *wmi, u8 *datap, int len)
{
struct wmi_bit_rate_reply *reply;
s32 rate;
u32 sgi, index;
u32 index;

if (len < sizeof(struct wmi_bit_rate_reply))
return -EINVAL;
Expand All @@ -1211,15 +1210,10 @@ static int ath6kl_wmi_bitrate_reply_rx(struct wmi *wmi, u8 *datap, int len)

ath6kl_dbg(ATH6KL_DBG_WMI, "rateindex %d\n", reply->rate_index);

if (reply->rate_index == (s8) RATE_AUTO) {
rate = RATE_AUTO;
} else {
if (reply->rate_index != (s8) RATE_AUTO) {
index = reply->rate_index & 0x7f;
if (WARN_ON_ONCE(index > (RATE_MCS_7_40 + 1)))
return -EINVAL;

sgi = (reply->rate_index & 0x80) ? 1 : 0;
rate = wmi_rate_tbl[index][sgi];
}

ath6kl_wakeup_event(wmi->parent_dev);
Expand Down

0 comments on commit e585184

Please sign in to comment.