From: Markus Elfring <Markus.Elfring@web.de>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
abaci@linux.alibaba.com, linux-wireless@vger.kernel.org,
kernel-janitors@vger.kernel.org,
Ping-Ke Shih <pkshih@realtek.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Kalle Valo <kvalo@kernel.org>
Subject: Re: [PATCH] wifi: rtw89: chan: Use swap() instead of open coding it
Date: Fri, 24 May 2024 12:18:46 +0200 [thread overview]
Message-ID: <5da17b58-c407-498b-a666-be98584c8011@web.de> (raw)
In-Reply-To: <20240524075819.2789-1-jiapeng.chong@linux.alibaba.com>
> 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@linux.alibaba.com>
> 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
prev parent reply other threads:[~2024-05-24 10:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-24 7:58 [PATCH] wifi: rtw89: chan: Use swap() instead of open coding it Jiapeng Chong
2024-05-24 9:47 ` Ping-Ke Shih
2024-05-24 10:18 ` Markus Elfring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5da17b58-c407-498b-a666-be98584c8011@web.de \
--to=markus.elfring@web.de \
--cc=abaci@linux.alibaba.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox