linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "wuqiang.matt" <wuqiang.matt@bytedance.com>
To: linux-trace-kernel@vger.kernel.org, mhiramat@kernel.org,
	davem@davemloft.net, anil.s.keshavamurthy@intel.com,
	naveen.n.rao@linux.ibm.com, rostedt@goodmis.org,
	peterz@infradead.org, akpm@linux-foundation.org,
	sander@svanheule.net, ebiggers@google.com,
	dan.j.williams@intel.com, jpoimboe@kernel.org
Cc: linux-kernel@vger.kernel.org, lkp@intel.com, mattwu@163.com,
	"wuqiang.matt" <wuqiang.matt@bytedance.com>
Subject: [PATCH v1] kprobes: unused header files removed
Date: Mon, 23 Oct 2023 19:22:45 +0800	[thread overview]
Message-ID: <20231023112245.6112-1-wuqiang.matt@bytedance.com> (raw)

As kernel test robot reported, lib/test_objpool.c (trace:probes/for-next)
has linux/version.h included, but version.h is not used at all. Then more
unused headers are found in test_objpool.c and rethook.c, and all of them
should be removed.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310191512.vvypKU5Z-lkp@intel.com/

Signed-off-by: wuqiang.matt <wuqiang.matt@bytedance.com>
---
 kernel/trace/rethook.c | 2 --
 lib/test_objpool.c     | 6 ------
 2 files changed, 8 deletions(-)

diff --git a/kernel/trace/rethook.c b/kernel/trace/rethook.c
index 13c8e6773892..6fd7d4ecbbc6 100644
--- a/kernel/trace/rethook.c
+++ b/kernel/trace/rethook.c
@@ -8,8 +8,6 @@
 #include <linux/preempt.h>
 #include <linux/rethook.h>
 #include <linux/slab.h>
-#include <linux/sort.h>
-#include <linux/smp.h>
 
 /* Return hook list (shadow stack by list) */
 
diff --git a/lib/test_objpool.c b/lib/test_objpool.c
index 98b5b37b6eea..a94078402138 100644
--- a/lib/test_objpool.c
+++ b/lib/test_objpool.c
@@ -6,21 +6,15 @@
  * Copyright: wuqiang.matt@bytedance.com
  */
 
-#include <linux/version.h>
 #include <linux/errno.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <linux/sched.h>
-#include <linux/cpumask.h>
 #include <linux/completion.h>
 #include <linux/kthread.h>
-#include <linux/cpu.h>
-#include <linux/cpuset.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
 #include <linux/hrtimer.h>
-#include <linux/interrupt.h>
 #include <linux/objpool.h>
 
 #define OT_NR_MAX_BULK (16)
-- 
2.40.1


             reply	other threads:[~2023-10-23 11:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 11:22 wuqiang.matt [this message]
2023-10-24  0:52 ` [PATCH v1] kprobes: unused header files removed Masami Hiramatsu

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=20231023112245.6112-1-wuqiang.matt@bytedance.com \
    --to=wuqiang.matt@bytedance.com \
    --cc=akpm@linux-foundation.org \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=davem@davemloft.net \
    --cc=ebiggers@google.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mattwu@163.com \
    --cc=mhiramat@kernel.org \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sander@svanheule.net \
    /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).