[ARM] 5297/1: [KS8695] Fix two compile-time warnings
authorAndrew Victor <linux@maxim.org.za>
Tue, 7 Oct 2008 19:44:07 +0000 (20:44 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 9 Oct 2008 09:16:00 +0000 (10:16 +0100)
Fix two warnings when compiling for the KS8695 processor.

arch/arm/include/asm/dma-mapping.h: In function 'dma_to_virt':
arch/arm/include/asm/dma-mapping.h:40: warning: return makes pointer
from integer without a cast

Section mismatch in reference from the function pcibios_fixup_bus() to
the (unknown reference) .devinit.text:(unknown)
The function pcibios_fixup_bus() references
the (unknown reference) __devinit (unknown).
This is often because pcibios_fixup_bus lacks a __devinit
annotation or the annotation of (unknown) is wrong.

Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-ks8695/include/mach/memory.h
arch/arm/mach-ks8695/pci.c

index dadbe66cb75c42b2364436ba2bc8736096d7c28a..8fbc4c76c38b6485000476d8809154e01f009873 100644 (file)
@@ -31,8 +31,8 @@
 /* Platform-bus mapping */
 extern struct bus_type platform_bus_type;
 #define is_lbus_device(dev)            (dev && dev->bus == &platform_bus_type)
-#define __arch_dma_to_virt(dev, x)     ({ is_lbus_device(dev) ? \
-                                       __phys_to_virt(x) : __bus_to_virt(x); })
+#define __arch_dma_to_virt(dev, x)     ({ (void *) (is_lbus_device(dev) ? \
+                                       __phys_to_virt(x) : __bus_to_virt(x)); })
 #define __arch_virt_to_dma(dev, x)     ({ is_lbus_device(dev) ? \
                                        (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); })
 #define __arch_page_to_dma(dev, x)     __arch_virt_to_dma(dev, page_address(x))
index 1746c67af1762f71ba42045088784fdc778cc68c..507933c8379c6e12204d72e2421fd9d6043d9426 100644 (file)
@@ -141,7 +141,7 @@ static struct pci_ops ks8695_pci_ops = {
        .write  = ks8695_pci_writeconfig,
 };
 
-static struct pci_bus *ks8695_pci_scan_bus(int nr, struct pci_sys_data *sys)
+static struct pci_bus* __init ks8695_pci_scan_bus(int nr, struct pci_sys_data *sys)
 {
        return pci_scan_bus(sys->busnr, &ks8695_pci_ops, sys);
 }