* [PATCH v1] kprobes: unused header files removed
@ 2023-10-23 11:22 wuqiang.matt
2023-10-24 0:52 ` Masami Hiramatsu
0 siblings, 1 reply; 2+ messages in thread
From: wuqiang.matt @ 2023-10-23 11:22 UTC (permalink / raw)
To: linux-trace-kernel, mhiramat, davem, anil.s.keshavamurthy,
naveen.n.rao, rostedt, peterz, akpm, sander, ebiggers,
dan.j.williams, jpoimboe
Cc: linux-kernel, lkp, mattwu, wuqiang.matt
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] kprobes: unused header files removed
2023-10-23 11:22 [PATCH v1] kprobes: unused header files removed wuqiang.matt
@ 2023-10-24 0:52 ` Masami Hiramatsu
0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2023-10-24 0:52 UTC (permalink / raw)
To: wuqiang.matt
Cc: linux-trace-kernel, davem, anil.s.keshavamurthy, naveen.n.rao,
rostedt, peterz, akpm, sander, ebiggers, dan.j.williams, jpoimboe,
linux-kernel, lkp, mattwu
On Mon, 23 Oct 2023 19:22:45 +0800
"wuqiang.matt" <wuqiang.matt@bytedance.com> wrote:
> 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/
Looks good to me.
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thanks,
>
> 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
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-24 0:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-23 11:22 [PATCH v1] kprobes: unused header files removed wuqiang.matt
2023-10-24 0:52 ` Masami Hiramatsu
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).