Name: Remove CONFIG_PROC_FS Where Compiler Will Discard Anyway Author: Rusty Russell Status: Experimental We used to get copies of static functions which are never used, because we do not use -O3 (-finline-functions), however with -funit-at-a-time we get the same effect. This means that many CONFIG_PROC_FS #defines can be removed: they just clutter the code. diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .14936-linux-2.6.5-rc2-bk2/kernel/dma.c .14936-linux-2.6.5-rc2-bk2.updated/kernel/dma.c --- .14936-linux-2.6.5-rc2-bk2/kernel/dma.c 2004-02-04 15:39:15.000000000 +1100 +++ .14936-linux-2.6.5-rc2-bk2.updated/kernel/dma.c 2004-03-23 12:58:34.000000000 +1100 @@ -111,8 +111,6 @@ void free_dma(unsigned int dmanr) #endif -#ifdef CONFIG_PROC_FS - #ifdef MAX_DMA_CHANNELS static int proc_dma_show(struct seq_file *m, void *v) { @@ -158,7 +156,6 @@ static int __init proc_dma_init(void) } __initcall(proc_dma_init); -#endif EXPORT_SYMBOL(request_dma); EXPORT_SYMBOL(free_dma); diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .14936-linux-2.6.5-rc2-bk2/kernel/resource.c .14936-linux-2.6.5-rc2-bk2.updated/kernel/resource.c --- .14936-linux-2.6.5-rc2-bk2/kernel/resource.c 2004-03-20 21:21:33.000000000 +1100 +++ .14936-linux-2.6.5-rc2-bk2.updated/kernel/resource.c 2004-03-23 12:58:53.000000000 +1100 @@ -41,8 +41,6 @@ EXPORT_SYMBOL(iomem_resource); static rwlock_t resource_lock = RW_LOCK_UNLOCKED; -#ifdef CONFIG_PROC_FS - enum { MAX_IORES_LEVEL = 5 }; static void *r_next(struct seq_file *m, void *v, loff_t *pos) @@ -144,8 +142,6 @@ static int __init ioresources_init(void) } __initcall(ioresources_init); -#endif /* CONFIG_PROC_FS */ - /* Return the conflict entry if you can't request it */ static struct resource * __request_resource(struct resource *root, struct resource *new) {