Search Linux Wireless

Re: [PATCH] wifi: rtw89: chan: Use swap() instead of open coding it

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

 



> Swap is a function interface that provides exchange function. To avoid
> code duplication, we can use swap function.

Would a wording approach (like the following) be a bit nicer
for the second sentence?

   Use existing swap() function instead of keeping duplicate source code.


How do you think about to apply the summary phrase “Use swap() in rtw89_swap_sub_entity()”?


> ./drivers/net/wireless/realtek/rtw89/chan.c:2336:32-33: WARNING opportunity for swap().
>
> Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9174

Would another indication be helpful for the involved analysis tool?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccinelle/misc/swap.cocci?h=v6.9

Regards,
Markus





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux