Re: [PATCH 1/1 linux-next] staging: rtl8723au: use swap() in WMMOnAssocRsp23a()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fabian Frederick <fabf@xxxxxxxxx> writes:
> Use kernel.h macro definition.
>
> Thanks to Julia Lawall for Coccinelle scripting support.
>
> Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
> ---
>  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;
>  				}
>  			}
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux