* fs/xfs/libxfs/xfs_da_btree.c:898:15-16: WARNING opportunity for swap()
@ 2021-07-07 22:21 kernel test robot
2021-07-07 22:21 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-07-07 22:21 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1154 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>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a931dd33d370896a683236bba67c0d6f3d01144d
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
date: 10 weeks ago
:::::: branch date: 4 hours ago
:::::: commit date: 10 weeks ago
config: x86_64-randconfig-c002-20210707 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> fs/xfs/libxfs/xfs_da_btree.c:898:15-16: WARNING opportunity for swap()
--
>> fs/xfs/xfs_inode.c:570:11-12: WARNING opportunity for swap()
fs/xfs/xfs_inode.c:573:21-22: WARNING opportunity for swap()
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 45603 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] coccinelle: misc: fix swap.cocci warnings
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 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-07 22:21 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1689 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: "Darrick J. Wong" <djwong@kernel.org>
CC: linux-xfs(a)vger.kernel.org
CC: Carlos Maiolino <cmaiolino@redhat.com>
CC: Dave Chinner <dchinner@redhat.com>
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
fs/xfs/libxfs/xfs_da_btree.c:898:15-16: 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: a931dd33d370896a683236bba67c0d6f3d01144d
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
:::::: branch date: 4 hours ago
:::::: commit date: 10 weeks ago
Please take the patch only if it's a positive warning. Thanks!
xfs_da_btree.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/fs/xfs/libxfs/xfs_da_btree.c
+++ b/fs/xfs/libxfs/xfs_da_btree.c
@@ -894,9 +894,7 @@ xfs_da3_node_rebalance(
((be32_to_cpu(btree2[0].hashval) < be32_to_cpu(btree1[0].hashval)) ||
(be32_to_cpu(btree2[nodehdr2.count - 1].hashval) <
be32_to_cpu(btree1[nodehdr1.count - 1].hashval)))) {
- tmpnode = node1;
- node1 = node2;
- node2 = tmpnode;
+ swap(node1, node2);
xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr1, node1);
xfs_da3_node_hdr_from_disk(dp->i_mount, &nodehdr2, node2);
btree1 = nodehdr1.btree;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-07 22:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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.