Skip to content

Commit

Permalink
[PATCH] remove many unneeded #includes of sched.h
Browse files Browse the repository at this point in the history
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there.  Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm.  I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <[email protected]>
Acked-by: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Tim Schmielau authored and Linus Torvalds committed Feb 14, 2007
1 parent 3fc605a commit cd354f1
Show file tree
Hide file tree
Showing 553 changed files with 6 additions and 553 deletions.
1 change: 0 additions & 1 deletion drivers/acorn/block/mfmhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
*/

#include <linux/module.h>
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/acorn/char/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/
#include <linux/capability.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/time.h>
#include <linux/miscdevice.h>
#include <linux/rtc.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/acpi/i2c_ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/acpi.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/acpi/sleep/poweroff.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <linux/pm.h>
#include <linux/init.h>
#include <acpi/acpi_bus.h>
#include <linux/sched.h>
#include <linux/sysdev.h>
#include <asm/io.h>
#include "sleep.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/acpi/tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/smp.h>
#include <linux/string.h>
#include <linux/types.h>
Expand Down
3 changes: 2 additions & 1 deletion drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
#include <linux/init.h>
#include <linux/types.h>
#include <linux/proc_fs.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/jiffies.h>
#include <linux/kmod.h>
#include <linux/seq_file.h>
#include <asm/uaccess.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/dma-mapping.h>
#include <linux/device.h>
#include <scsi/scsi_host.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/pdc_adma.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/device.h>
#include <scsi/scsi_host.h>
#include <linux/libata.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/dma-mapping.h>
#include <linux/device.h>
#include <scsi/scsi_host.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/sata_promise.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/device.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/sata_qstor.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/device.h>
#include <scsi/scsi_host.h>
#include <linux/libata.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/sata_sx4.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_cmnd.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/atm/adummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <asm/io.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/atm/fore200e.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/capability.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/bitops.h>
#include <linux/pci.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/atm/idt77105.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/errno.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/atm/uPD98402.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


#include <linux/module.h>
#include <linux/sched.h> /* for jiffies */
#include <linux/mm.h>
#include <linux/errno.h>
#include <linux/atmdev.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/atm/zatm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/pci.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/block/acsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/fs.h>
#include <linux/kernel.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/block/paride/pd.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_GEO, D_SBY, D_DLY, D_SLV};
#include <linux/blkpg.h>
#include <linux/kernel.h>
#include <asm/uaccess.h>
#include <linux/sched.h>
#include <linux/workqueue.h>

static DEFINE_SPINLOCK(pd_lock);
Expand Down
1 change: 0 additions & 1 deletion drivers/block/umem.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
*/

//#define DEBUG /* uncomment if you want debugging info (pr_debug) */
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/bio.h>
#include <linux/kernel.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/bluetooth/bfusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/skbuff.h>

Expand Down
1 change: 0 additions & 1 deletion drivers/bluetooth/bt3c_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/ptrace.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/bluetooth/btuart_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/ptrace.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/bluetooth/dtl1_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/ptrace.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/bluetooth/hci_bcsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/bluetooth/hci_h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/bluetooth/hci_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/bluetooth/hci_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/unistd.h>
#include <linux/types.h>
#include <linux/interrupt.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/cdrom/aztcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@

#include <linux/module.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/timer.h>
#include <linux/fs.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/cdrom/cm206.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@
#include <linux/errno.h> /* These include what we really need */
#include <linux/delay.h>
#include <linux/string.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/timer.h>
#include <linux/cdrom.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/cdrom/gscd.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/fs.h>
#include <linux/mm.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/cdrom/sjcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@

#include <linux/module.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/timer.h>
#include <linux/fs.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/briq_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include <linux/types.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/tty.h>
#include <linux/timer.h>
#include <linux/kernel.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/drm/ffb_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* for authors.
*/

#include <linux/sched.h>
#include <asm/upa.h>

#include "ffb.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/char/drm/ffb_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "ffb_drv.h"

#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <asm/shmparam.h>
#include <asm/oplib.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/ds1620.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* thermometer driver (as used in the Rebel.com NetWinder)
*/
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/miscdevice.h>
#include <linux/smp_lock.h>
#include <linux/delay.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/dsp56k.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include <linux/module.h>
#include <linux/slab.h> /* for kmalloc() and kfree() */
#include <linux/sched.h> /* for struct wait_queue etc */
#include <linux/major.h>
#include <linux/types.h>
#include <linux/errno.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/hvsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <linux/module.h>
#include <linux/major.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/sysrq.h>
#include <linux/tty.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/ipmi/ipmi_devintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <linux/moduleparam.h>
#include <linux/errno.h>
#include <asm/system.h>
#include <linux/sched.h>
#include <linux/poll.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/ipmi/ipmi_msghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <linux/module.h>
#include <linux/errno.h>
#include <asm/system.h>
#include <linux/sched.h>
#include <linux/poll.h>
#include <linux/spinlock.h>
#include <linux/mutex.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#define NVRAM_VERSION "1.2"

#include <linux/module.h>
#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <linux/nvram.h>

Expand Down
1 change: 0 additions & 1 deletion drivers/char/nwflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/proc_fs.h>
#include <linux/sched.h>
#include <linux/miscdevice.h>
#include <linux/spinlock.h>
#include <linux/rwsem.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <linux/module.h> /* For EXPORT_SYMBOL */

#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/ser_a2232.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
#include <linux/module.h>

#include <linux/types.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/errno.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/sonypi.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <linux/module.h>
#include <linux/input.h>
#include <linux/pci.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/miscdevice.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/tlclk.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/kernel.h> /* printk() */
#include <linux/fs.h> /* everything... */
#include <linux/errno.h> /* error codes */
Expand Down
1 change: 0 additions & 1 deletion drivers/char/toshiba.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/miscdevice.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*
*/

#include <linux/sched.h>
#include <linux/poll.h>
#include <linux/spinlock.h>
#include "tpm.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/char/vc_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <linux/major.h>
#include <linux/errno.h>
#include <linux/tty.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/mm.h>
#include <linux/init.h>
Expand Down
Loading

0 comments on commit cd354f1

Please sign in to comment.