linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wireless: rtw88: rtw8822c: eliminate code duplication, use native swap() function
@ 2020-09-13 16:59 Ivan Safonov
  2020-09-16  6:09 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Safonov @ 2020-09-13 16:59 UTC (permalink / raw)
  To: Yan-Hsuan Chuang
  Cc: Kalle Valo, David S. Miller, Jakub Kicinski, linux-wireless,
	netdev, linux-kernel, Ivan Safonov

swap_u32() duplicate native swap(), so replace swap_u32() with swap().

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/net/wireless/realtek/rtw88/rtw8822c.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
index 426808413baa..e196d7939025 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
@@ -154,25 +154,16 @@ static void rtw8822c_rf_minmax_cmp(struct rtw_dev *rtwdev, u32 value,
 	}
 }
 
-static void swap_u32(u32 *v1, u32 *v2)
-{
-	u32 tmp;
-
-	tmp = *v1;
-	*v1 = *v2;
-	*v2 = tmp;
-}
-
 static void __rtw8822c_dac_iq_sort(struct rtw_dev *rtwdev, u32 *v1, u32 *v2)
 {
 	if (*v1 >= 0x200 && *v2 >= 0x200) {
 		if (*v1 > *v2)
-			swap_u32(v1, v2);
+			swap(*v1, *v2);
 	} else if (*v1 < 0x200 && *v2 < 0x200) {
 		if (*v1 > *v2)
-			swap_u32(v1, v2);
+			swap(*v1, *v2);
 	} else if (*v1 < 0x200 && *v2 >= 0x200) {
-		swap_u32(v1, v2);
+		swap(*v1, *v2);
 	}
 }
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: rtw88: rtw8822c: eliminate code duplication, use native swap() function
  2020-09-13 16:59 [PATCH] wireless: rtw88: rtw8822c: eliminate code duplication, use native swap() function Ivan Safonov
@ 2020-09-16  6:09 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-09-16  6:09 UTC (permalink / raw)
  To: Ivan Safonov
  Cc: Yan-Hsuan Chuang, David S. Miller, Jakub Kicinski,
	linux-wireless, netdev, linux-kernel, Ivan Safonov

Ivan Safonov <insafonov@gmail.com> wrote:

> swap_u32() duplicate native swap(), so replace swap_u32() with swap().
> 
> Signed-off-by: Ivan Safonov <insafonov@gmail.com>

Patch applied to wireless-drivers-next.git, thanks.

d10f6af58ef4 rtw88: rtw8822c: eliminate code duplication, use native swap() function

-- 
https://patchwork.kernel.org/patch/11772397/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-16  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-13 16:59 [PATCH] wireless: rtw88: rtw8822c: eliminate code duplication, use native swap() function Ivan Safonov
2020-09-16  6:09 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).