Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=576e393e74e58bd4c949d551a3340accc8dbab0f
Commit:     576e393e74e58bd4c949d551a3340accc8dbab0f
Parent:     4c2a54b09ba35a409afc34bd331a57a994921664
Author:     Emil Medve <[EMAIL PROTECTED]>
AuthorDate: Thu Sep 20 12:25:17 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Sat Sep 22 14:49:22 2007 +1000

    [POWERPC] Fix build errors when BLOCK=n
    
    These are the symptom error messages:
    
      CC      arch/powerpc/kernel/setup_32.o
    In file included from include/linux/blkdev.h:17,
                     from include/linux/ide.h:13,
                     from arch/powerpc/kernel/setup_32.c:13:
    include/linux/bsg.h:67: warning: 'struct request_queue' declared inside 
parameter list
    include/linux/bsg.h:67: warning: its scope is only this definition or 
declaration, which is probably not what you want
    include/linux/bsg.h:71: warning: 'struct request_queue' declared inside 
parameter list
    In file included from arch/powerpc/kernel/setup_32.c:13:
    include/linux/ide.h:857: error: field 'wrq' has incomplete type
    
      CC      arch/powerpc/kernel/ppc_ksyms.o
    In file included from include/linux/blkdev.h:17,
                     from include/linux/ide.h:13,
                     from arch/powerpc/kernel/ppc_ksyms.c:15:
    include/linux/bsg.h:67: warning: 'struct request_queue' declared inside 
parameter list
    include/linux/bsg.h:67: warning: its scope is only this definition or 
declaration, which is probably not what you want
    include/linux/bsg.h:71: warning: 'struct request_queue' declared inside 
parameter list
    In file included from arch/powerpc/kernel/ppc_ksyms.c:15:
    include/linux/ide.h:857: error: field 'wrq' has incomplete type
    
    The fix tries to use the smallest scope CONFIG_* symbols that will fix
    the build problem.  In this case <linux/ide.h> needs to be included
    only if IDE=y or IDE=m were selected.  Also, ppc_ide_md is needed only
    if BLK_DEV_IDE=y or BLK_DEV_IDE=m
    
    Moved the EXPORT_SYMBOL(ppc_ide_md) from ppc_ksysms.c next to its
    declaration in setup_32.c which made <linux/ide.h> not needed. With
    <linux/ide.h> gone from ppc_ksyms.c, <asm/cacheflush.h> is needed to
    address the following warnings and errors:
    
      CC      arch/powerpc/kernel/ppc_ksyms.o
    arch/powerpc/kernel/ppc_ksyms.c:122: error: '__flush_icache_range' 
undeclared here (not in a function)
    arch/powerpc/kernel/ppc_ksyms.c:122: warning: type defaults to 'int' in 
declaration of '__flush_icache_range'
    arch/powerpc/kernel/ppc_ksyms.c:123: error: 'flush_dcache_range' undeclared 
here (not in a function)
    arch/powerpc/kernel/ppc_ksyms.c:123: warning: type defaults to 'int' in 
declaration of 'flush_dcache_range'
    
    Signed-off-by: Emil Medve <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/kernel/ppc_ksyms.c |    6 +-----
 arch/powerpc/kernel/setup_32.c  |    5 +++++
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index 430c502..c6b1aa3 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -12,12 +12,12 @@
 #include <linux/irq.h>
 #include <linux/pci.h>
 #include <linux/delay.h>
-#include <linux/ide.h>
 #include <linux/bitops.h>
 
 #include <asm/page.h>
 #include <asm/semaphore.h>
 #include <asm/processor.h>
+#include <asm/cacheflush.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/atomic.h>
@@ -95,10 +95,6 @@ EXPORT_SYMBOL(__strnlen_user);
 EXPORT_SYMBOL(copy_4K_page);
 #endif
 
-#if defined(CONFIG_PPC32) && (defined(CONFIG_BLK_DEV_IDE) || 
defined(CONFIG_BLK_DEV_IDE_MODULE))
-EXPORT_SYMBOL(ppc_ide_md);
-#endif
-
 #if defined(CONFIG_PCI) && defined(CONFIG_PPC32)
 EXPORT_SYMBOL(isa_io_base);
 EXPORT_SYMBOL(isa_mem_base);
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index a288a5f..7474502 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -10,7 +10,9 @@
 #include <linux/reboot.h>
 #include <linux/delay.h>
 #include <linux/initrd.h>
+#if defined(CONFIG_IDE) || defined(CONFIG_IDE_MODULE)
 #include <linux/ide.h>
+#endif
 #include <linux/tty.h>
 #include <linux/bootmem.h>
 #include <linux/seq_file.h>
@@ -49,7 +51,10 @@
 
 extern void bootx_init(unsigned long r4, unsigned long phys);
 
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
 struct ide_machdep_calls ppc_ide_md;
+EXPORT_SYMBOL(ppc_ide_md);
+#endif
 
 int boot_cpuid;
 EXPORT_SYMBOL_GPL(boot_cpuid);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to