Message ID | 20190213014917.164506-1-yuehaibing@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | e97cb6ea71b03e13449726d57f2409f66e531180 |
Delegated to: | Kalle Valo |
Headers | show |
Series | libertas_tf: remove set but not used variable 'flags' | expand |
On Tue, Feb 12, 2019 at 5:35 PM YueHaibing <yuehaibing@huawei.com> wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/wireless/marvell/libertas_tf/main.c: In function 'lbtf_rx': > drivers/net/wireless/marvell/libertas_tf/main.c:554:15: warning: > variable 'flags' set but not used [-Wunused-but-set-variable] > > It never used and can be removed. > > Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Steve deRosier <derosier@cal-sierra.com>
YueHaibing <yuehaibing@huawei.com> wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/wireless/marvell/libertas_tf/main.c: In function 'lbtf_rx': > drivers/net/wireless/marvell/libertas_tf/main.c:554:15: warning: > variable 'flags' set but not used [-Wunused-but-set-variable] > > It never used and can be removed. > > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > Acked-by: Steve deRosier <derosier@cal-sierra.com> Patch applied to wireless-drivers-next.git, thanks. e97cb6ea71b0 libertas_tf: remove set but not used variable 'flags'
diff --git a/drivers/net/wireless/marvell/libertas_tf/main.c b/drivers/net/wireless/marvell/libertas_tf/main.c index a7cb7d06e5e6..d36962528838 100644 --- a/drivers/net/wireless/marvell/libertas_tf/main.c +++ b/drivers/net/wireless/marvell/libertas_tf/main.c @@ -551,7 +551,6 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb) struct ieee80211_rx_status stats; struct rxpd *prxpd; int need_padding; - unsigned int flags; struct ieee80211_hdr *hdr; lbtf_deb_enter(LBTF_DEB_RX); @@ -572,7 +571,6 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb) skb_pull(skb, sizeof(struct rxpd)); hdr = (struct ieee80211_hdr *)skb->data; - flags = le32_to_cpu(*(__le32 *)(skb->data + 4)); need_padding = ieee80211_is_data_qos(hdr->frame_control); need_padding ^= ieee80211_has_a4(hdr->frame_control);
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/marvell/libertas_tf/main.c: In function 'lbtf_rx': drivers/net/wireless/marvell/libertas_tf/main.c:554:15: warning: variable 'flags' set but not used [-Wunused-but-set-variable] It never used and can be removed. Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- drivers/net/wireless/marvell/libertas_tf/main.c | 2 -- 1 file changed, 2 deletions(-)