Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sysctl: Remove superfluous includes from kernel/sysctl.c

Remove the following headers from the include list in sysctl.c.

* These are removed as the related variables are no longer there.
=================== ====================
Include Related Var
=================== ====================
linux/kmod.h usermodehelper
asm/nmi.h nmi_watchdoc_enabled
asm/io.h io_delay_type
linux/pid.h pid_max_{,min,max}
linux/sched/sysctl.h sysctl_{sched_*,numa_*,timer_*}
linux/mount.h sysctl_mount_max
linux/reboot.h poweroff_cmd
linux/ratelimit.h {,printk_}ratelimit_state
linux/printk.h kptr_restrict
linux/security.h CONFIG_SECURITY_CAPABILITIES
linux/net.h net_table
linux/key.h key_sysctls
linux/nvs_fs.h acpi_video_flags
linux/acpi.h acpi_video_flags
linux/fs.h proc_nr_files

* These are no longer needed as intermediate includes
==============
Include
==============
linux/filter.h
linux/binfmts.h

Reviewed-by: Kees Cook <kees@kernel.org>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Joel Granados <joel.granados@kernel.org>

-20
-20
kernel/sysctl.c
··· 5 5 6 6 #include <linux/sysctl.h> 7 7 #include <linux/bitmap.h> 8 - #include <linux/printk.h> 9 8 #include <linux/proc_fs.h> 10 - #include <linux/security.h> 11 9 #include <linux/ctype.h> 12 - #include <linux/filter.h> 13 - #include <linux/fs.h> 14 10 #include <linux/init.h> 15 11 #include <linux/kernel.h> 16 12 #include <linux/kobject.h> 17 - #include <linux/net.h> 18 13 #include <linux/highuid.h> 19 14 #include <linux/writeback.h> 20 - #include <linux/ratelimit.h> 21 15 #include <linux/initrd.h> 22 - #include <linux/key.h> 23 16 #include <linux/times.h> 24 17 #include <linux/limits.h> 25 18 #include <linux/syscalls.h> 26 - #include <linux/nfs_fs.h> 27 - #include <linux/acpi.h> 28 - #include <linux/reboot.h> 29 - #include <linux/kmod.h> 30 19 #include <linux/capability.h> 31 - #include <linux/binfmts.h> 32 - #include <linux/sched/sysctl.h> 33 - #include <linux/mount.h> 34 - #include <linux/pid.h> 35 20 36 21 #include "../lib/kstrtox.h" 37 22 38 23 #include <linux/uaccess.h> 39 24 #include <asm/processor.h> 40 - 41 - #ifdef CONFIG_X86 42 - #include <asm/nmi.h> 43 - #include <asm/io.h> 44 - #endif 45 25 46 26 /* shared constants to be used in various sysctls */ 47 27 const int sysctl_vals[] = { 0, 1, 2, 3, 4, 100, 200, 1000, 3000, INT_MAX, 65535, -1 };