lkml.org 
[lkml]   [2004]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
SubjectRe: includes cleanup.
On Thu, 19 Aug 2004, Dave Jones wrote:

> I noticed that every file that could be built as a module was sucking
> in sched.h (and therefore, every other include file under the sun).
>
> This patch
> - removes the sched.h from module.h
> - Moves the capable() definition from sched.h to capability.h
> - split out the wake_up_* stuff to linux/wakeup.h
> - Removed sched.h includes from a bunch of drivers that didn't
> need it due to the above work.
> - Fixes up all the breakage I was able to find under x86.
> Fixing other arch's is simple enough, they just need to include
> sched.h explicity in a few places now (or jiffies.h, or capability.h or wakeup.h))
>
> I've not done any measurements to see if this is noticable on a compile,
> as I'd expect it to be mostly in the noise anyway (though last time I
> did this in 2.5.early, it did shave off the best part of a minute off
> my worst-case-scenario build), but untangling the spaghetti of includes
> a little should at least mean gcc uses less memory during the build.
>
> comments?


Hey, it's includes cleanup time again?
I've postponed my work in late 2.5 for 2.7, but with the new development
model it seems we are asked to destabilize 2.6 instead ;-)

Patch looks good to me, I also had a patch waiting to move capable() to
where it belongs. So I went to the attic and started my kludgy old scripts
on your updated patch. I really should try to dust them of and understand
them again...

Some driver fixups to it that look valid at a short first glance are
below.

Tim


--- linux-2.6.8.1-sr1/drivers/char/efirtc.c 2004-04-04 05:37:37.000000000 +0200
+++ linux-2.6.8.1-sr2/drivers/char/efirtc.c 2004-08-20 16:28:26.000000000 +0200
@@ -36,6 +36,7 @@
#include <linux/rtc.h>
#include <linux/proc_fs.h>
#include <linux/efi.h>
+#include <linux/capability.h>

#include <asm/uaccess.h>
#include <asm/system.h>
--- linux-2.6.8.1-sr1/drivers/char/watchdog/shwdt.c 2004-08-17 21:38:52.000000000 +0200
+++ linux-2.6.8.1-sr2/drivers/char/watchdog/shwdt.c 2004-08-20 16:31:40.000000000 +0200
@@ -28,6 +28,8 @@
#include <linux/notifier.h>
#include <linux/ioport.h>
#include <linux/fs.h>
+#include <linux/jiffies.h>
+#include <linux/timer.h>

#include <asm/io.h>
#include <asm/uaccess.h>
--- linux-2.6.8.1-sr1/drivers/input/gameport/gameport.c 2004-08-17 00:13:33.000000000 +0200
+++ linux-2.6.8.1-sr2/drivers/input/gameport/gameport.c 2004-08-20 16:32:15.000000000 +0200
@@ -18,6 +18,7 @@
#include <linux/slab.h>
#include <linux/stddef.h>
#include <linux/delay.h>
+#include <linux/jiffies.h>

MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION("Generic gameport layer");
--- linux-2.6.8.1-sr1/drivers/macintosh/ans-lcd.c 2004-08-17 21:38:52.000000000 +0200
+++ linux-2.6.8.1-sr2/drivers/macintosh/ans-lcd.c 2004-08-20 16:32:47.000000000 +0200
@@ -9,6 +9,7 @@
#include <linux/fcntl.h>
#include <linux/init.h>
#include <linux/delay.h>
+#include <linux/capability.h>
#include <asm/uaccess.h>
#include <asm/sections.h>
#include <asm/prom.h>
--- linux-2.6.8.1-sr1/drivers/media/dvb/frontends/dst.c 2004-08-17 00:13:25.000000000 +0200
+++ linux-2.6.8.1-sr2/drivers/media/dvb/frontends/dst.c 2004-08-20 16:33:12.000000000 +0200
@@ -29,6 +29,7 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/delay.h>
+#include <linux/jiffies.h>
#include <asm/div64.h>

#include "dvb_frontend.h"
--- linux-2.6.8.1-sr1/drivers/media/dvb/frontends/grundig_29504-491.c 2004-08-17 00:13:25.000000000 +0200
+++ linux-2.6.8.1-sr2/drivers/media/dvb/frontends/grundig_29504-491.c 2004-08-20 16:33:36.000000000 +0200
@@ -29,6 +29,7 @@
#include <linux/module.h>
#include <linux/string.h>
#include <linux/slab.h>
+#include <linux/jiffies.h>

#include "dvb_frontend.h"
#include "dvb_functions.h"
--- linux-2.6.8.1-sr1/drivers/media/dvb/frontends/stv0299.c 2004-08-17 21:38:52.000000000 +0200
+++ linux-2.6.8.1-sr2/drivers/media/dvb/frontends/stv0299.c 2004-08-20 16:34:01.000000000 +0200
@@ -50,6 +50,7 @@
#include <linux/module.h>
#include <linux/string.h>
#include <linux/slab.h>
+#include <linux/jiffies.h>
#include <asm/div64.h>

#include "dvb_frontend.h"
--- linux-2.6.8.1-sr1/drivers/media/dvb/frontends/tda1004x.c 2004-08-17 21:38:52.000000000 +0200
+++ linux-2.6.8.1-sr2/drivers/media/dvb/frontends/tda1004x.c 2004-08-20 16:34:29.000000000 +0200
@@ -42,6 +42,7 @@
#include <linux/fcntl.h>
#include <linux/errno.h>
#include <linux/syscalls.h>
+#include <linux/jiffies.h>

#include "dvb_frontend.h"
#include "dvb_functions.h"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.117 / U:2.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site