Nuke a few duplicate includes
cover Nuke a few duplicate includes
Including the same header twice (or more) in a .c file, outside any #ifdef's and whatnot, serves no purpose except generating more work for the compiler, so here are 3 patches that get rid of some pointless duplicate includes.
Kind regards,
Jesper Juhl <[email protected]>
PATCH 1/3 Nuke duplicate include from printk.c
From: Jesper Juhl <[email protected]>
Remove the duplicate inclusion of linux/jiffies.h from kernel/printk.c
---
printk.c | 1 - 1 file changed, 1 deletion(-)
kernel/printk.c +0 -1
@@ -32,7 +32,6 @@#include <linux/security.h> #include <linux/bootmem.h> #include <linux/syscalls.h> -#include <linux/jiffies.h> #include <asm/uaccess.h>
PATCH 2/3 Nuke a duplicate include from profile.c
In reply to Jesper JuhlFrom: Jesper Juhl <[email protected]>
Remove duplicate inclusion of linux/profile.h from kernel/profile.c
---
profile.c | 1 - 1 file changed, 1 deletion(-)
kernel/profile.c +0 -1
@@ -20,7 +20,6 @@#include <linux/mm.h> #include <linux/cpumask.h> #include <linux/cpu.h> -#include <linux/profile.h> #include <linux/highmem.h> #include <linux/mutex.h> #include <asm/sections.h>
PATCH 3/3 Nuke duplicate header from sysctl.c
In reply to Jesper JuhlFrom: Jesper Juhl <[email protected]>
Don't include linux/security.h twice in kernel/sysctl.c
---
sysctl.c | 1 - 1 file changed, 1 deletion(-)
kernel/sysctl.c +0 -1
@@ -37,7 +37,6 @@#include <linux/highuid.h> #include <linux/writeback.h> #include <linux/hugetlb.h> -#include <linux/security.h> #include <linux/initrd.h> #include <linux/times.h> #include <linux/limits.h>