2008-01-02 02:44:16

by Jesper Juhl

[permalink] [raw]
Subject: [PATCH 0/3] 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]>


2008-01-02 02:50:11

by Jesper Juhl

[permalink] [raw]
Subject: [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

Signed-off-by: Jesper Juhl <[email protected]>
---

printk.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/kernel/printk.c b/kernel/printk.c
index 89011bf..b4bca0d 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -32,7 +32,6 @@
#include <linux/security.h>
#include <linux/bootmem.h>
#include <linux/syscalls.h>
-#include <linux/jiffies.h>

#include <asm/uaccess.h>



2008-01-02 02:50:55

by Jesper Juhl

[permalink] [raw]
Subject: [PATCH 2/3] Nuke a duplicate include from profile.c

From: Jesper Juhl <[email protected]>

Remove duplicate inclusion of linux/profile.h from kernel/profile.c

Signed-off-by: Jesper Juhl <[email protected]>
---

profile.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/kernel/profile.c b/kernel/profile.c
index 5e95330..ffaebea 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -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>



2008-01-02 02:51:58

by Jesper Juhl

[permalink] [raw]
Subject: [PATCH 3/3] Nuke duplicate header from sysctl.c

From: Jesper Juhl <[email protected]>


Don't include linux/security.h twice in kernel/sysctl.c

Signed-off-by: Jesper Juhl <[email protected]>
---

sysctl.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index c68f68d..01b12c3 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -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>