diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-06-10 16:32:17 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-13 00:19:47 (GMT) |
commit | 2ccd94e412be244d46fdf3261763d921d4918761 (patch) | |
tree | 5b75f9c3465be9b5c37a8e78870f260cf55c3f5b | |
parent | 8781d5b3499a0ceb19217f937d37c796cce8ca58 (diff) | |
download | linux-2ccd94e412be244d46fdf3261763d921d4918761.tar.xz |
staging: rtl8723au: use swap() in WMMOnAssocRsp23a()
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8723au/core/rtw_wlan_util.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c b/drivers/staging/rtl8723au/core/rtw_wlan_util.c index 5280338..3c1315fc 100644 --- a/drivers/staging/rtl8723au/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8723au/core/rtw_wlan_util.c @@ -573,7 +573,7 @@ void WMMOnAssocRsp23a(struct rtw_adapter *padapter) inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3; if (pregpriv->wifi_spec == 1) { - u32 j, tmp, change_inx = false; + u32 j, change_inx = false; /* entry indx: 0->vo, 1->vi, 2->be, 3->bk. */ for (i = 0; i < 4; i++) { @@ -589,14 +589,8 @@ void WMMOnAssocRsp23a(struct rtw_adapter *padapter) } if (change_inx) { - tmp = edca[i]; - edca[i] = edca[j]; - edca[j] = tmp; - - tmp = inx[i]; - inx[i] = inx[j]; - inx[j] = tmp; - + swap(edca[i], edca[j]); + swap(inx[i], inx[j]); change_inx = false; } } |