From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] coccinelle: misc: fix swap.cocci warnings
Date: Fri, 03 Sep 2021 22:17:14 +0800 [thread overview]
Message-ID: <20210903141714.GA25234@05eaed123dd8> (raw)
In-Reply-To: <202109032239.GxQeFP15-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@inria.fr>
CC: linux-ia64(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
arch/ia64/kernel/setup.c:213:39-40: WARNING opportunity for swap()
Check for opencoded swap() implementation.
Generated by: scripts/coccinelle/misc/swap.cocci
CC: Denis Efremov <efremov@linux.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a9c9a6f741cdaa2fa9ba24a790db8d07295761e3
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
:::::: branch date: 16 hours ago
:::::: commit date: 4 months ago
Please take the patch only if it's a positive warning. Thanks!
setup.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -209,9 +209,7 @@ sort_regions (struct rsvd_region *rsvd_r
for (j = 0; j < max; ++j) {
if (rsvd_region[j].start > rsvd_region[j+1].start) {
struct rsvd_region tmp;
- tmp = rsvd_region[j];
- rsvd_region[j] = rsvd_region[j + 1];
- rsvd_region[j + 1] = tmp;
+ swap(rsvd_region[j], rsvd_region[j + 1]);
}
}
}
next prev parent reply other threads:[~2021-09-03 14:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-03 14:17 arch/ia64/kernel/setup.c:213:39-40: WARNING opportunity for swap() kernel test robot
2021-09-03 14:17 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-02-08 17:43 lib/bch.c:842:7-8: " kernel test robot
2022-02-08 17:35 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2022-02-07 11:12 lib/bch.c:842:7-8: WARNING opportunity for swap() kernel test robot
2022-02-07 11:05 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2022-02-01 20:12 lib/bch.c:842:7-8: WARNING opportunity for swap() kernel test robot
2022-02-01 20:02 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2022-01-31 12:17 lib/bch.c:842:7-8: WARNING opportunity for swap() kernel test robot
2022-01-31 12:13 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2022-01-28 7:28 lib/bch.c:842:7-8: WARNING opportunity for swap() kernel test robot
2022-01-28 7:19 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2022-01-28 4:50 lib/bch.c:842:7-8: WARNING opportunity for swap() kernel test robot
2022-01-28 4:40 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2022-01-25 12:39 lib/bch.c:842:7-8: WARNING opportunity for swap() kernel test robot
2022-01-25 12:34 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2022-01-23 2:36 lib/bch.c:842:7-8: WARNING opportunity for swap() kernel test robot
2022-01-23 2:27 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2022-01-22 20:15 lib/bch.c:842:7-8: WARNING opportunity for swap() kernel test robot
2022-01-22 18:27 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2022-01-20 16:24 lib/bch.c:842:7-8: WARNING opportunity for swap() kernel test robot
2022-01-20 16:15 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2022-01-19 9:01 lib/bch.c:842:7-8: WARNING opportunity for swap() kernel test robot
2022-01-19 8:55 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2022-01-18 11:13 lib/bch.c:842:7-8: WARNING opportunity for swap() kernel test robot
2022-01-18 8:17 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2021-12-31 17:42 kernel test robot
2021-12-16 14:00 kernel test robot
2021-12-13 17:02 kernel test robot
2021-12-12 0:37 kernel test robot
2021-12-11 14:08 kernel test robot
2021-12-07 10:15 kernel test robot
2021-11-27 18:42 kernel test robot
2021-11-13 12:20 arch/arc/kernel/unwind.c:251:22-23: WARNING opportunity for swap() kernel test robot
2021-11-13 12:20 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2021-11-12 10:32 drivers/leds/leds-tca6507.c:246:14-15: WARNING opportunity for swap() kernel test robot
2021-11-12 10:32 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2021-11-11 20:49 arch/um/os-Linux/sigio.c:81:28-29: WARNING opportunity for swap() kernel test robot
2021-11-11 20:49 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2021-08-30 12:52 arch/parisc/mm/init.c:138:36-37: WARNING opportunity for swap() kernel test robot
2021-08-30 12:52 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2021-07-29 23:45 arch/x86/kernel/unwind_orc.c:212:16-17: WARNING opportunity for swap() kernel test robot
2021-07-29 23:46 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2021-07-18 19:14 arch/arc/kernel/unwind.c:251:22-23: WARNING opportunity for swap() kernel test robot
2021-07-18 19:14 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2021-07-13 23:10 drivers/net/ethernet/sfc/efx_channels.c:804:36-37: WARNING opportunity for swap() kernel test robot
2021-07-13 23:11 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
2021-07-07 22:21 fs/xfs/libxfs/xfs_da_btree.c:898:15-16: WARNING opportunity for swap() kernel test robot
2021-07-07 22:21 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
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=20210903141714.GA25234@05eaed123dd8 \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.