kprobes: unused header files removed
authorwuqiang.matt <wuqiang.matt@bytedance.com>
Mon, 23 Oct 2023 11:22:45 +0000 (19:22 +0800)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Tue, 24 Oct 2023 01:04:59 +0000 (10:04 +0900)
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.

Link: https://lore.kernel.org/all/20231023112245.6112-1-wuqiang.matt@bytedance.com/
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>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
kernel/trace/rethook.c
lib/test_objpool.c

index 13c8e6773892087ff5aa6f3abdeb655585086b73..6fd7d4ecbbc67b85ff2d96a07e8f22c7e89a41b8 100644 (file)
@@ -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) */
 
index 98b5b37b6eea545b716db3e493807729e7a4a888..a9407840213851eb8399f67c7de67530a3d41669 100644 (file)
@@ -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)