Revert "um: Use swap() to make code cleaner"
PATCH 1/1 Revert "um: Use swap() to make code cleaner"
This reverts commit 9b0da3f22307af693be80f5d3a89dc4c7f360a85.
The sigio.h is clearly user space code which is handled by arch/um/scripts/Makefile.rules (see USER_OBJS rule).
The above mentioned commit simply broke this agreement, we may not use Linux kernel internal headers in them without thorough thinking.
Hence, revert the wrong commit.
--- arch/um/os-Linux/sigio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
arch/um/os-Linux/sigio.c +4 -3
@@ -3,7 +3,6 @@* Copyright (C) 2002 - 2008 Jeff Dike (jdike@{addtoit,linux.intel}.com) */ -#include <linux/minmax.h> #include <unistd.h> #include <errno.h> #include <fcntl.h>
@@ -51,7 +50,7 @@ static struct pollfds all_sigio_fds;static int write_sigio_thread (void *unused) { -struct pollfds *fds; +struct pollfds *fds, tmp;struct pollfd *p;int i, n, respond_fd;char c;
@@ -78,7 +77,9 @@ static int write_sigio_thread(void *unused)"write_sigio_thread : " "read on socket failed, " "err = %d\n", errno); -swap (current_poll, next_poll); + tmp = current_poll; + current_poll = next_poll; + next_poll = tmp; respond_fd = sigio_private[1 ]; }else {
Signature · 7 lines
2.40.0.1.gaa8946217a0b _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
Quoted 3 lines · Andy Shevchenko
This reverts commit
9b0da3f22307af693be80f5d3a89dc4c7f360a85.The
sigio.his clearly user space code which is handled by
Should be .c
Quoted 7 lines
arch/um/scripts/Makefile.rules(seeUSER_OBJSrule).The above mentioned commit simply broke this agreement, we may not use Linux kernel internal headers in them without thorough thinking.
Hence, revert the wrong commit.
Missing Reported-by
Quoted 1 line
I have just sent a v2: https://lore.kernel.org/r/[email protected].
Signature · 9 lines
With Best Regards, Andy Shevchenko _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um