Messages in this thread Patch in this message | | | Subject | Re: [RESEND PATCH 3/4] futex: Remove unused or redundant includes | From | André Almeida <> | Date | Fri, 17 Jul 2020 19:39:37 -0300 |
| |
On 7/17/20 6:46 PM, Thomas Gleixner wrote: > André Almeida <andrealmeid@collabora.com> writes: > >> Since 82af7aca ("Removal of FUTEX_FD"), some includes related to file >> operations aren't needed anymore. More investigation around the includes >> showed that a lot of includes aren't required for compilation, possible >> due to redundant includes. Simplify the code by removing unused >> includes. >> >> Signed-off-by: André Almeida <andrealmeid@collabora.com> >> --- >> To test this code, I compiled with different configurations (x86_64, >> i386, with x32 ABI supported enabled/disabled), and ran futex >> selftests. > > I agree fully with the FD related ones, but are you sure that all of the > others are included on all architectures magically? x86 is just one > piece of the puzzle. We'll see ... >
I just retested compiling tip/locking/core, and it seems something changed the last time I wrote the patch. Removing <linux/compat.h> will indeed break the compilation now, the patch bellow should fix it. Sorry for the noise.
-- >8 --
Subject: [PATCH 1/1] futex: Add compat include
Commit 38aa3c15b3a4 removed includes that seemed to be unused. However, removing <linux/compat.h> makes the compilation fail if the build configuration supports compatibility ABIs. Fix that by reinserting the include.
Fixes: 38aa3c15b3a4 ("futex: Remove unused or redundant includes") Signed-off-by: André Almeida <andrealmeid@collabora.com> --- kernel/futex.c | 1 + 1 file changed, 1 insertion(+)
=======================================
diff --git a/kernel/futex.c b/kernel/futex.c index f483bc52dbac..4616d4ad609d 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -31,6 +31,7 @@
31 * "The futexes are also cursed." 32 * "But they come in a choice of three flavours!" 33 */ +34#include <linux/compat.h> 35#include <linux/jhash.h> 36#include <linux/pagemap.h> 37#include <linux/syscalls.h> --
| |