CC: [email protected]
CC: [email protected]
TO: Denis Efremov <[email protected]>
CC: Julia Lawall <[email protected]>
CC: Jeff Dike <[email protected]>
CC: Richard Weinberger <[email protected]>
CC: Anton Ivanov <[email protected]>
CC: Johannes Berg <[email protected]>
CC: [email protected]
CC: [email protected]

From: kernel test robot <[email protected]>

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 <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   2585cf9dfaaddf00b069673f27bb3f8530e2039c
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap 
script
:::::: branch date: 18 hours ago
:::::: commit date: 8 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 {
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to