* [PATCH 1/1 linux-next] staging: rtl8723au: use swap() in WMMOnAssocRsp23a()
@ 2015-06-10 16:32 Fabian Frederick
2015-06-10 17:54 ` Jes Sorensen
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2015-06-10 16:32 UTC (permalink / raw)
To: linux-kernel
Cc: Julia Lawall, Fabian Frederick, Larry Finger, Jes Sorensen,
Greg Kroah-Hartman, linux-wireless, devel
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
drivers/staging/rtl8723au/core/rtw_wlan_util.c | 12 +++---------
1 file 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;
}
}
--
2.4.2
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH 1/1 linux-next] staging: rtl8723au: use swap() in WMMOnAssocRsp23a()
2015-06-10 16:32 [PATCH 1/1 linux-next] staging: rtl8723au: use swap() in WMMOnAssocRsp23a() Fabian Frederick
@ 2015-06-10 17:54 ` Jes Sorensen
0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2015-06-10 17:54 UTC (permalink / raw)
To: Fabian Frederick
Cc: linux-kernel, Julia Lawall, Larry Finger, Greg Kroah-Hartman,
linux-wireless, devel
Fabian Frederick <fabf@skynet.be> writes:
> Use kernel.h macro definition.
>
> Thanks to Julia Lawall for Coccinelle scripting support.
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> drivers/staging/rtl8723au/core/rtw_wlan_util.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
Please make sure you base your patches off the staging tree, not off
linux-next.
Jes
>
> 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;
> }
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-10 17:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10 16:32 [PATCH 1/1 linux-next] staging: rtl8723au: use swap() in WMMOnAssocRsp23a() Fabian Frederick
2015-06-10 17:54 ` Jes Sorensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®