linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@collabora.com>
To: linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org
Cc: mingo@redhat.com, dvhart@infradead.org, kernel@collabora.com,
	krisman@collabora.com,
	"André Almeida" <andrealmeid@collabora.com>
Subject: [RESEND PATCH 3/4] futex: Remove unused or redundant includes
Date: Thu,  2 Jul 2020 17:28:42 -0300	[thread overview]
Message-ID: <20200702202843.520764-4-andrealmeid@collabora.com> (raw)
In-Reply-To: <20200702202843.520764-1-andrealmeid@collabora.com>

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.
---
 kernel/futex.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/kernel/futex.c b/kernel/futex.c
index 362fbca6d614..697835ad5bff 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -31,31 +31,13 @@
  *  "The futexes are also cursed."
  *  "But they come in a choice of three flavours!"
  */
-#include <linux/compat.h>
-#include <linux/slab.h>
-#include <linux/poll.h>
-#include <linux/fs.h>
-#include <linux/file.h>
 #include <linux/jhash.h>
-#include <linux/init.h>
-#include <linux/futex.h>
-#include <linux/mount.h>
 #include <linux/pagemap.h>
 #include <linux/syscalls.h>
-#include <linux/signal.h>
-#include <linux/export.h>
-#include <linux/magic.h>
-#include <linux/pid.h>
-#include <linux/nsproxy.h>
-#include <linux/ptrace.h>
-#include <linux/sched/rt.h>
-#include <linux/sched/wake_q.h>
-#include <linux/sched/mm.h>
 #include <linux/hugetlb.h>
 #include <linux/freezer.h>
 #include <linux/memblock.h>
 #include <linux/fault-inject.h>
-#include <linux/refcount.h>
 
 #include <asm/futex.h>
 
-- 
2.27.0


  parent reply	other threads:[~2020-07-02 20:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 20:28 [RESEND PATCH 0/4] futex: Minor code improvements André Almeida
2020-07-02 20:28 ` [RESEND PATCH 1/4] futex: Remove put_futex_key() André Almeida
2020-07-17 22:01   ` [tip: locking/core] " tip-bot2 for André Almeida
2020-07-02 20:28 ` [RESEND PATCH 2/4] futex: Remove needless goto's André Almeida
2020-07-17 22:01   ` [tip: locking/core] " tip-bot2 for André Almeida
2020-07-02 20:28 ` André Almeida [this message]
2020-07-17 21:46   ` [RESEND PATCH 3/4] futex: Remove unused or redundant includes Thomas Gleixner
2020-07-17 22:39     ` André Almeida
2020-07-18  0:02       ` Thomas Gleixner
2020-07-17 22:01   ` [tip: locking/core] " tip-bot2 for André Almeida
2020-07-18  0:01   ` tip-bot2 for André Almeida
2020-07-02 20:28 ` [RESEND PATCH 4/4] futex: Consistently use fshared as boolean André Almeida
2020-07-17 22:01   ` [tip: locking/core] " tip-bot2 for André Almeida
2020-07-18  0:01   ` tip-bot2 for André Almeida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200702202843.520764-4-andrealmeid@collabora.com \
    --to=andrealmeid@collabora.com \
    --cc=dvhart@infradead.org \
    --cc=kernel@collabora.com \
    --cc=krisman@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).