diff options
author | Jahnavi Meher <jahnavi.meher@gmail.com> | 2014-06-25 06:18:15 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-25 15:40:41 -0400 |
commit | d51193d4ae181df37e9196a54b1fe3360ca920f2 (patch) | |
tree | b7387e4eba2a56054d6d0bf2335c5a52f213db5c /drivers/net/wireless/rsi | |
parent | 688df7ec26ffde2c8d79b0ac1a3378155da59ff2 (diff) |
rsi: Fixed warnings reported by static code analyzers.
Fixed a warning related to incorrect return type and removed an
unnecessary semi colon.
Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rsi')
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_core.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_core.c b/drivers/net/wireless/rsi/rsi_91x_core.c index 1cd0914db270..f3d3995d8f6b 100644 --- a/drivers/net/wireless/rsi/rsi_91x_core.c +++ b/drivers/net/wireless/rsi/rsi_91x_core.c | |||
@@ -92,6 +92,7 @@ static u32 rsi_get_num_pkts_dequeue(struct rsi_common *common, u8 q_num) | |||
92 | struct sk_buff *skb; | 92 | struct sk_buff *skb; |
93 | u32 pkt_cnt = 0; | 93 | u32 pkt_cnt = 0; |
94 | s16 txop = common->tx_qinfo[q_num].txop * 32; | 94 | s16 txop = common->tx_qinfo[q_num].txop * 32; |
95 | __le16 r_txop; | ||
95 | struct ieee80211_rate rate; | 96 | struct ieee80211_rate rate; |
96 | 97 | ||
97 | rate.bitrate = RSI_RATE_MCS0 * 5 * 10; /* Convert to Kbps */ | 98 | rate.bitrate = RSI_RATE_MCS0 * 5 * 10; /* Convert to Kbps */ |
@@ -104,10 +105,11 @@ static u32 rsi_get_num_pkts_dequeue(struct rsi_common *common, u8 q_num) | |||
104 | return 0; | 105 | return 0; |
105 | 106 | ||
106 | do { | 107 | do { |
107 | txop -= ieee80211_generic_frame_duration(adapter->hw, | 108 | r_txop = ieee80211_generic_frame_duration(adapter->hw, |
108 | adapter->vifs[0], | 109 | adapter->vifs[0], |
109 | common->band, | 110 | common->band, |
110 | skb->len, &rate); | 111 | skb->len, &rate); |
112 | txop -= le16_to_cpu(r_txop); | ||
111 | pkt_cnt += 1; | 113 | pkt_cnt += 1; |
112 | /*checking if pkts are still there*/ | 114 | /*checking if pkts are still there*/ |
113 | if (skb_queue_len(&common->tx_queue[q_num]) - pkt_cnt) | 115 | if (skb_queue_len(&common->tx_queue[q_num]) - pkt_cnt) |
@@ -191,7 +193,7 @@ get_queue_num: | |||
191 | if (q_num == VO_Q || q_num == VI_Q) { | 193 | if (q_num == VO_Q || q_num == VI_Q) { |
192 | common->pkt_cnt = rsi_get_num_pkts_dequeue(common, q_num); | 194 | common->pkt_cnt = rsi_get_num_pkts_dequeue(common, q_num); |
193 | common->pkt_cnt -= 1; | 195 | common->pkt_cnt -= 1; |
194 | }; | 196 | } |
195 | 197 | ||
196 | return q_num; | 198 | return q_num; |
197 | } | 199 | } |