Skip to contentSkip to conversation

Nuke a few duplicate includes

PATCH New Jesper Juhl 1 participant 4 messages Jan 2, 2008 Proc sysctl

lore
Share & tools
lore
#0 lore raw

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]>

#1 lore raw

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
index 89011bf..b4bca0d 100644
@@ -32,7 +32,6 @@
 #include <linux/security.h>
 #include <linux/bootmem.h>
 #include <linux/syscalls.h>
-#include <linux/jiffies.h>
 
 #include <asm/uaccess.h>
 
#2 lore raw

PATCH 2/3 Nuke a duplicate include from profile.c

In reply to Jesper Juhl

From: 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
index 5e95330..ffaebea 100644
@@ -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>
#3 lore raw

PATCH 3/3 Nuke duplicate header from sysctl.c

In reply to Jesper Juhl

From: 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
index c68f68d..01b12c3 100644
@@ -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>