From: Valdis.Kletnieks@vt.edu 15 changes of #if to #ifdef and 2 places CONFIG_FOO should be defined(CONFIG_FOO). This gets rid of spurious warnings if you build with "-Wundef" so you get a warning if you have a preprocessor command like: #if CONFIG_ETRAX_DS1302_RSTBIT == 27 and you'll be told if it's substituting a zero rather than silent weirdness and unexpected code generation. --- 25-akpm/arch/ia64/sn/kernel/irq.c | 2 +- 25-akpm/drivers/char/mem.c | 2 -- 25-akpm/drivers/mtd/maps/solutionengine.c | 2 +- 25-akpm/drivers/net/depca.c | 4 ++-- 25-akpm/drivers/net/tulip/de4x5.c | 4 ++-- 25-akpm/include/asm-i386/module.h | 2 +- 25-akpm/include/asm-mips/hardirq.h | 2 +- 25-akpm/include/asm-mips/pgtable-32.h | 2 +- 25-akpm/include/asm-mips/topology.h | 2 +- 25-akpm/include/asm-sh/hardirq.h | 2 +- 25-akpm/include/asm-sh/kmap_types.h | 2 +- 25-akpm/lib/crc32.c | 2 +- 25-akpm/net/ipv6/af_inet6.c | 2 +- arch/um/kernel/mem.c | 0 14 files changed, 14 insertions(+), 16 deletions(-) diff -puN arch/ia64/sn/kernel/irq.c~ifdef-cleanups arch/ia64/sn/kernel/irq.c --- 25/arch/ia64/sn/kernel/irq.c~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/arch/ia64/sn/kernel/irq.c Fri Feb 13 18:03:09 2004 @@ -121,7 +121,7 @@ sn_end_irq(unsigned int irq) static void sn_set_affinity_irq(unsigned int irq, unsigned long cpu) { -#if CONFIG_SMP +#ifdef CONFIG_SMP int redir = 0; struct sn_intr_list_t *p = sn_intr_list[irq]; pcibr_intr_t intr; diff -puN arch/um/kernel/mem.c~ifdef-cleanups arch/um/kernel/mem.c diff -puN drivers/char/mem.c~ifdef-cleanups drivers/char/mem.c --- 25/drivers/char/mem.c~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/drivers/char/mem.c Fri Feb 13 18:03:09 2004 @@ -11,8 +11,6 @@ #include #include #include -#include -#include #include #include #include diff -puN drivers/mtd/maps/solutionengine.c~ifdef-cleanups drivers/mtd/maps/solutionengine.c --- 25/drivers/mtd/maps/solutionengine.c~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/drivers/mtd/maps/solutionengine.c Fri Feb 13 18:03:09 2004 @@ -97,7 +97,7 @@ static int __init init_soleng_maps(void) nr_parts = parse_mtd_partitions(flash_mtd, probes, &parsed_parts, 0); -#if CONFIG_MTD_SUPERH_RESERVE +#ifdef CONFIG_MTD_SUPERH_RESERVE if (nr_parts <= 0) { printk(KERN_NOTICE "Using configured partition at 0x%08x.\n", CONFIG_MTD_SUPERH_RESERVE); diff -puN drivers/net/depca.c~ifdef-cleanups drivers/net/depca.c --- 25/drivers/net/depca.c~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/drivers/net/depca.c Fri Feb 13 18:03:09 2004 @@ -2086,7 +2086,7 @@ static int __init depca_module_init (voi { int err = 0; -#if CONFIG_MCA +#ifdef CONFIG_MCA err = mca_register_driver (&depca_mca_driver); #endif #ifdef CONFIG_EISA @@ -2101,7 +2101,7 @@ static int __init depca_module_init (voi static void __exit depca_module_exit (void) { int i; -#if CONFIG_MCA +#ifdef CONFIG_MCA mca_unregister_driver (&depca_mca_driver); #endif #ifdef CONFIG_EISA diff -puN drivers/net/tulip/de4x5.c~ifdef-cleanups drivers/net/tulip/de4x5.c --- 25/drivers/net/tulip/de4x5.c~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/drivers/net/tulip/de4x5.c Fri Feb 13 18:03:09 2004 @@ -5745,7 +5745,7 @@ static int __init de4x5_module_init (voi { int err = 0; -#if CONFIG_PCI +#ifdef CONFIG_PCI err = pci_module_init (&de4x5_pci_driver); #endif #ifdef CONFIG_EISA @@ -5757,7 +5757,7 @@ static int __init de4x5_module_init (voi static void __exit de4x5_module_exit (void) { -#if CONFIG_PCI +#ifdef CONFIG_PCI pci_unregister_driver (&de4x5_pci_driver); #endif #ifdef CONFIG_EISA diff -puN include/asm-i386/module.h~ifdef-cleanups include/asm-i386/module.h --- 25/include/asm-i386/module.h~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/include/asm-i386/module.h Fri Feb 13 18:03:09 2004 @@ -48,7 +48,7 @@ struct mod_arch_specific #define MODULE_PROC_FAMILY "WINCHIP3D " #elif defined CONFIG_MCYRIXIII #define MODULE_PROC_FAMILY "CYRIXIII " -#elif CONFIG_MVIAC3_2 +#elif defined CONFIG_MVIAC3_2 #define MODULE_PROC_FAMILY "VIAC3-2 " #else #define MODULE_PROC_FAMILY "this needs to be fixed" diff -puN include/asm-mips/hardirq.h~ifdef-cleanups include/asm-mips/hardirq.h --- 25/include/asm-mips/hardirq.h~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/include/asm-mips/hardirq.h Fri Feb 13 18:03:09 2004 @@ -79,7 +79,7 @@ typedef struct { #define irq_enter() (preempt_count() += HARDIRQ_OFFSET) -#if CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT # define in_atomic() (preempt_count() != kernel_locked()) # define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1) #else diff -puN include/asm-mips/pgtable-32.h~ifdef-cleanups include/asm-mips/pgtable-32.h --- 25/include/asm-mips/pgtable-32.h~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/include/asm-mips/pgtable-32.h Fri Feb 13 18:03:09 2004 @@ -80,7 +80,7 @@ extern int add_temporary_entry(unsigned #define VMALLOC_START KSEG2 -#if CONFIG_HIGHMEM +#ifdef CONFIG_HIGHMEM # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) #else # define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE) diff -puN include/asm-mips/topology.h~ifdef-cleanups include/asm-mips/topology.h --- 25/include/asm-mips/topology.h~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/include/asm-mips/topology.h Fri Feb 13 18:03:09 2004 @@ -1,7 +1,7 @@ #ifndef __ASM_TOPOLOGY_H #define __ASM_TOPOLOGY_H -#if CONFIG_SGI_IP27 +#ifdef CONFIG_SGI_IP27 #include diff -puN include/asm-sh/hardirq.h~ifdef-cleanups include/asm-sh/hardirq.h --- 25/include/asm-sh/hardirq.h~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/include/asm-sh/hardirq.h Fri Feb 13 18:03:09 2004 @@ -74,7 +74,7 @@ typedef struct { #define nmi_enter() (irq_enter()) #define nmi_exit() (preempt_count() -= HARDIRQ_OFFSET) -#if CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT # define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked()) # define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1) #else diff -puN include/asm-sh/kmap_types.h~ifdef-cleanups include/asm-sh/kmap_types.h --- 25/include/asm-sh/kmap_types.h~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/include/asm-sh/kmap_types.h Fri Feb 13 18:03:09 2004 @@ -5,7 +5,7 @@ #include -#if CONFIG_DEBUG_HIGHMEM +#ifdef CONFIG_DEBUG_HIGHMEM # define D(n) __KM_FENCE_##n , #else # define D(n) diff -puN lib/crc32.c~ifdef-cleanups lib/crc32.c --- 25/lib/crc32.c~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/lib/crc32.c Fri Feb 13 18:03:09 2004 @@ -397,7 +397,7 @@ EXPORT_SYMBOL(bitreverse); * the same way on decoding, it doesn't make a difference. */ -#if UNITTEST +#ifdef UNITTEST #include #include diff -puN net/ipv6/af_inet6.c~ifdef-cleanups net/ipv6/af_inet6.c --- 25/net/ipv6/af_inet6.c~ifdef-cleanups Fri Feb 13 18:03:09 2004 +++ 25-akpm/net/ipv6/af_inet6.c Fri Feb 13 18:03:09 2004 @@ -56,7 +56,7 @@ #include #include #include -#if CONFIG_IPV6_TUNNEL +#ifdef CONFIG_IPV6_TUNNEL #include #endif _