All of lore.kernel.org
 help / color / mirror / Atom feed
* arch/arc/kernel/unwind.c:251:22-23: WARNING opportunity for swap()
@ 2021-07-18 19:14 kernel test robot
  2021-07-18 19:14 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-07-18 19:14 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1070 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:   1d67c8d993baf8ab6be8a2154b1a94ec1311c869
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
date:   3 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 3 months ago
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 10.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 >>)
>> arch/arc/kernel/unwind.c:251:22-23: WARNING opportunity for swap()
   arch/arc/kernel/unwind.c:254:18-19: 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: 68072 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] coccinelle: misc: fix swap.cocci warnings
  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 ` kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-07-18 19:14 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1655 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: Vineet Gupta <vgupta@synopsys.com>
CC: "dean.yang_cp" <yangdianqing@yulong.com>
CC: "Gustavo A. R. Silva" <gustavoars@kernel.org>
CC: linux-snps-arc(a)lists.infradead.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

arch/arc/kernel/unwind.c:251:22-23: WARNING opportunity for swap()
arch/arc/kernel/unwind.c:254:18-19: 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:   1d67c8d993baf8ab6be8a2154b1a94ec1311c869
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
:::::: branch date: 20 hours ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 unwind.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

--- a/arch/arc/kernel/unwind.c
+++ b/arch/arc/kernel/unwind.c
@@ -247,12 +247,8 @@ static void swap_eh_frame_hdr_table_entr
 	struct eh_frame_hdr_table_entry *e2 = p2;
 	unsigned long v;
 
-	v = e1->start;
-	e1->start = e2->start;
-	e2->start = v;
-	v = e1->fde;
-	e1->fde = e2->fde;
-	e2->fde = v;
+	swap(e1->start, e2->start);
+	swap(e1->fde, e2->fde);
 }
 
 static void init_unwind_hdr(struct unwind_table *table,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* arch/arc/kernel/unwind.c:251:22-23: WARNING opportunity for swap()
@ 2021-11-13 12:20 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-11-13 12:20 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1070 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:   66f4beaa6c1d28161f534471484b2daa2de1dce0
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
date:   7 months ago
:::::: branch date: 16 hours ago
:::::: commit date: 7 months ago
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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 >>)
>> arch/arc/kernel/unwind.c:251:22-23: WARNING opportunity for swap()
   arch/arc/kernel/unwind.c:254:18-19: 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: 68050 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-13 12:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2021-11-13 12:20 arch/arc/kernel/unwind.c:251:22-23: WARNING opportunity for swap() 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.