* arch/um/os-Linux/sigio.c:81:28-29: WARNING opportunity for swap()
@ 2021-11-11 20:49 kernel test robot
2021-11-11 20:49 ` [PATCH] coccinelle: misc: fix swap.cocci warnings kernel test robot
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-11-11 20:49 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1004 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: debe436e77c72fcee804fb867f275e6d31aa999c
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
date: 6 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 6 months ago
config: um-x86_64_defconfig (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 >>)
>> arch/um/os-Linux/sigio.c:81:28-29: 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: 8687 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] coccinelle: misc: fix swap.cocci warnings
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 ` kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-11-11 20:49 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1588 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: Jeff Dike <jdike@addtoit.com>
CC: Richard Weinberger <richard@nod.at>
CC: Anton Ivanov <anton.ivanov@cambridgegreys.com>
CC: Johannes Berg <johannes.berg@intel.com>
CC: linux-um(a)lists.infradead.org
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
arch/um/os-Linux/sigio.c:81:28-29: 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: debe436e77c72fcee804fb867f275e6d31aa999c
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
:::::: branch date: 20 hours ago
:::::: commit date: 6 months ago
Please take the patch only if it's a positive warning. Thanks!
sigio.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/arch/um/os-Linux/sigio.c
+++ b/arch/um/os-Linux/sigio.c
@@ -77,9 +77,7 @@ static int write_sigio_thread(void *unus
"write_sigio_thread : "
"read on socket failed, "
"err = %d\n", errno);
- tmp = current_poll;
- current_poll = next_poll;
- next_poll = tmp;
+ swap(current_poll, next_poll);
respond_fd = sigio_private[1];
}
else {
^ permalink raw reply [flat|nested] 3+ messages in thread
* arch/um/os-Linux/sigio.c:81:28-29: WARNING opportunity for swap()
@ 2021-12-13 17:04 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-12-13 17:04 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1074 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: 2585cf9dfaaddf00b069673f27bb3f8530e2039c
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
date: 8 months ago
:::::: branch date: 18 hours ago
:::::: commit date: 8 months ago
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20211214/202112140113.RM7VjE3T-lkp(a)intel.com/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 >>)
>> arch/um/os-Linux/sigio.c:81:28-29: 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-13 17:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
-- strict thread matches above, loose matches on Subject: below --
2021-12-13 17:04 arch/um/os-Linux/sigio.c:81:28-29: 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.