From: John W. L. <lin...@tu...> - 2005-08-01 01:15:38
|
Fix-up a bunch of APUS-related compiler warnings. Signed-off-by: John W. Linville <lin...@tu...> --- Some of these are probably just pedantic fixups. Others might actually being restoring functionality lost in some unknown round of previous changes. Either way, I think they are all reasonable... There is still a warning in drivers/video/amifb.c that I wasn't sure how to fix. It looks like someone is doing a 16-bit shift inside a 16-bit wide value...? Hopefully someone else knows what it is supposed to be doing. arch/ppc/mm/pgtable.c | 2 +- arch/ppc/platforms/apus_pci.c | 6 +++--- arch/ppc/platforms/apus_setup.c | 6 ++++++ drivers/block/z2ram.c | 2 +- drivers/net/8390.h | 8 ++++---- drivers/net/apne.c | 3 ++- drivers/scsi/NCR53C9x.c | 4 ++++ drivers/scsi/wd33c93.c | 1 + sound/oss/dmasound/dmasound_paula.c | 7 ++++--- 10 files changed, 29 insertions(+), 16 deletions(-) --- linux-apus/sound/oss/dmasound/dmasound_paula.c.orig 2005-07-31 15:26:18.000000000 -0400 +++ linux-apus/sound/oss/dmasound/dmasound_paula.c 2005-07-31 15:28:24.000000000 -0400 @@ -246,6 +246,7 @@ static ssize_t funcname(const u_char *us { \ ssize_t count, used; \ u_short data; \ + u_short *user_data = (u_short *)userPtr; \ \ if (!dmasound.soft.stereo) { \ u_char *high = &frame[*frameUsed>>1]; \ @@ -253,7 +254,7 @@ static ssize_t funcname(const u_char *us count = min_t(size_t, userCount, frameLeft)>>1 & ~1; \ used = count*2; \ while (count > 0) { \ - if (get_user(data, ((u_short *)userPtr)++)) \ + if (get_user(data, user_data++)) \ return -EFAULT; \ data = convsample(data); \ *high++ = data>>8; \ @@ -268,12 +269,12 @@ static ssize_t funcname(const u_char *us count = min_t(size_t, userCount, frameLeft)>>2 & ~1; \ used = count*4; \ while (count > 0) { \ - if (get_user(data, ((u_short *)userPtr)++)) \ + if (get_user(data, user_data++)) \ return -EFAULT; \ data = convsample(data); \ *lefth++ = data>>8; \ *leftl++ = (data>>2) & 0x3f; \ - if (get_user(data, ((u_short *)userPtr)++)) \ + if (get_user(data, user_data++)) \ return -EFAULT; \ data = convsample(data); \ *righth++ = data>>8; \ --- linux-apus/drivers/block/z2ram.c.orig 2005-07-31 15:51:47.000000000 -0400 +++ linux-apus/drivers/block/z2ram.c 2005-07-31 15:54:11.000000000 -0400 @@ -78,7 +78,7 @@ static void do_z2_request(request_queue_ unsigned long len = req->current_nr_sectors << 9; if (start + len > z2ram_size) { - printk( KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n", + printk( KERN_ERR DEVICE_NAME ": bad access: block=%llu, count=%u\n", req->sector, req->current_nr_sectors); end_request(req, 0); continue; --- linux-apus/drivers/scsi/NCR53C9x.c.orig 2005-07-31 16:12:37.000000000 -0400 +++ linux-apus/drivers/scsi/NCR53C9x.c 2005-07-31 16:13:38.000000000 -0400 @@ -3648,5 +3648,9 @@ EXPORT_SYMBOL(esp_reset); EXPORT_SYMBOL(esp_slave_alloc); EXPORT_SYMBOL(esp_slave_destroy); EXPORT_SYMBOL(esps_in_use); +EXPORT_SYMBOL(esps_running); +EXPORT_SYMBOL(nesps); +EXPORT_SYMBOL(esp_release); +EXPORT_SYMBOL(esp_proc_info); MODULE_LICENSE("GPL"); --- linux-apus/drivers/scsi/wd33c93.c.orig 2005-07-31 14:53:04.000000000 -0400 +++ linux-apus/drivers/scsi/wd33c93.c 2005-07-31 14:53:10.000000000 -0400 @@ -80,6 +80,7 @@ #include <linux/version.h> #include <linux/init.h> #include <linux/blkdev.h> +#include <linux/interrupt.h> #include <asm/irq.h> #include <scsi/scsi.h> --- linux-apus/drivers/net/apne.c.orig 2005-07-31 15:55:07.000000000 -0400 +++ linux-apus/drivers/net/apne.c 2005-07-31 16:22:18.000000000 -0400 @@ -629,7 +629,8 @@ static int init_pcmcia(void) } #endif - out_8(GAYLE_ATTRIBUTE+offset, config); + out_8((volatile unsigned char __iomem *)(GAYLE_ATTRIBUTE+offset), + config); return 1; } --- linux-apus/drivers/net/8390.h.orig 2005-07-31 15:04:12.000000000 -0400 +++ linux-apus/drivers/net/8390.h 2005-07-31 15:04:08.000000000 -0400 @@ -117,10 +117,10 @@ struct ei_device { #undef outb #undef outb_p -#define inb(port) in_8(port) -#define outb(val,port) out_8(port,val) -#define inb_p(port) in_8(port) -#define outb_p(val,port) out_8(port,val) +#define inb(port) in_8((volatile unsigned char __iomem *)port) +#define outb(val,port) out_8((volatile unsigned char __iomem *)port,val) +#define inb_p(port) in_8((volatile unsigned char __iomem *)port) +#define outb_p(val,port) out_8((volatile unsigned char __iomem *)port,val) #elif defined(CONFIG_ARM_ETHERH) || defined(CONFIG_ARM_ETHERH_MODULE) #define EI_SHIFT(x) (ei_local->reg_offset[x]) --- linux-apus/arch/ppc/platforms/apus_setup.c.orig 2005-07-31 16:10:45.000000000 -0400 +++ linux-apus/arch/ppc/platforms/apus_setup.c 2005-07-31 16:15:53.000000000 -0400 @@ -46,6 +46,9 @@ struct mem_info memory[NUM_MEMINFO];/* m int m68k_realnum_memory = 0; struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */ +EXPORT_SYMBOL(m68k_realnum_memory); +EXPORT_SYMBOL(m68k_memory); + unsigned long ppc_memstart; unsigned long ppc_pgstart; unsigned long ppc_memoffset; @@ -370,6 +373,7 @@ int mm_end_of_chunk (unsigned long addr, return 1; return 0; } +EXPORT_SYMBOL(mm_end_of_chunk); /*********************************************************** CACHE */ @@ -392,6 +396,7 @@ void cache_push(u32 paddr, int length) "sync \n\t" : : "r" (addr)); } +EXPORT_SYMBOL(cache_push); void cache_clear(u32 paddr, int length) { @@ -427,6 +432,7 @@ void cache_clear(u32 paddr, int length) "isync \n\t" : : "r" (addr)); } +EXPORT_SYMBOL(cache_clear); /****************************************************** from setup.c */ void --- linux-apus/arch/ppc/platforms/apus_pci.c.orig 2005-07-31 15:48:28.000000000 -0400 +++ linux-apus/arch/ppc/platforms/apus_pci.c 2005-07-31 16:22:38.000000000 -0400 @@ -59,7 +59,7 @@ void *pci_io_base(unsigned int bus) int -apus_pcibios_read_config(struct pci_bus *bus, int devfn, int offset, +apus_pcibios_read_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) { int fnno = FNNO(devfn); @@ -91,8 +91,8 @@ apus_pcibios_read_config(struct pci_bus } int -apus_pcibios_write_config(struct pci_bus *bus, int devfn, int offset, - int len, u32 *val) +apus_pcibios_write_config(struct pci_bus *bus, unsigned int devfn, int offset, + int len, u32 val) { int fnno = FNNO(devfn); int devno = DEVNO(devfn); --- linux-apus/arch/ppc/mm/pgtable.c.orig 2005-07-31 14:55:59.000000000 -0400 +++ linux-apus/arch/ppc/mm/pgtable.c 2005-07-31 14:57:19.000000000 -0400 @@ -191,7 +191,7 @@ __ioremap(phys_addr_t addr, unsigned lon * Don't allow anybody to remap normal RAM that we're using. * mem_init() sets high_memory so only do the check after that. */ - if (mem_init_done && (p + size >= virt_to_phys(KERNELBASE)) && + if (mem_init_done && (p + size >= virt_to_phys((void *)KERNELBASE)) && (p < virt_to_phys(high_memory))) { printk("__ioremap(): phys addr "PHYS_FMT" is RAM lr %p\n", p, __builtin_return_address(0)); -- John W. Linville lin...@tu... |