CC: kbuild-all(a)lists.01.org CC: linux-kernel(a)vger.kernel.org TO: Denis Efremov CC: Julia Lawall CC: Jeff Dike CC: Richard Weinberger CC: Anton Ivanov CC: Johannes Berg CC: linux-um(a)lists.infradead.org CC: linux-kernel(a)vger.kernel.org From: kernel test robot 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 Reported-by: kernel test robot Signed-off-by: kernel test robot --- 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 {