From: Markus Elfring <Markus.Elfring@web.de>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
abaci@linux.alibaba.com, dm-devel@lists.linux.dev,
kernel-janitors@vger.kernel.org,
Matthew Sakai <msakai@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dm vdo indexer: Use swap() instead of open coding it
Date: Fri, 24 May 2024 15:48:25 +0200 [thread overview]
Message-ID: <085b205a-8658-49ba-a8cb-8ffdba9d7a85@web.de> (raw)
In-Reply-To: <20240524074109.13433-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 rather than duplicating its implementation.
How do you think about to apply the summary phrase “Use swap() in swap_open_chapter()”?
> ./drivers/md/dm-vdo/indexer/index.c:207:43-44: WARNING opportunity for swap().
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9173
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
next prev parent reply other threads:[~2024-05-24 13:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-24 7:41 Jiapeng Chong
2024-05-24 13:48 ` Markus Elfring [this message]
2024-05-29 2:00 ` Matthew Sakai
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=085b205a-8658-49ba-a8cb-8ffdba9d7a85@web.de \
--to=markus.elfring@web.de \
--cc=abaci@linux.alibaba.com \
--cc=dm-devel@lists.linux.dev \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=msakai@redhat.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
all inboxes | Powered by JetHome®