mtd/drivers/mtd/maps amd76xrom.c, 1.18, 1.19 dilnetpc.c, 1.16, 1.17 ebony.c, 1.13, 1.14 elan-104nc.c, 1.24, 1.25 ichxrom.c, 1.15, 1.16 l440gx.c, 1.16, 1.17 netsc520.c, 1.12, 1.13 nettel.c, 1.8, 1.9 pci.c, 1.8, 1.9 physmap.c, 1.36, 1.37 sbc_gxx.c, 1.32, 1.33 sc520cdp.c, 1.18, 1.19 scb2_flash.c, 1.10, 1.11 scx200_docflash.c, 1.9, 1.10 ts5500_flash.c, 1.1, 1.2

David Woodhouse dwmw2 at infradead.org
Sun Nov 28 04:40:43 EST 2004


Update of /home/cvs/mtd/drivers/mtd/maps
In directory phoenix.infradead.org:/tmp/cvs-serv32596

Modified Files:
	amd76xrom.c dilnetpc.c ebony.c elan-104nc.c ichxrom.c l440gx.c 
	netsc520.c nettel.c pci.c physmap.c sbc_gxx.c sc520cdp.c 
	scb2_flash.c scx200_docflash.c ts5500_flash.c 
Log Message:
        NULL noise removal, missing __iomem in a couple of declarations,
removal of bogus cast to void * in iounmap() calls.
Signed-off-by: Al Viro <viro at parcelfarce.linux.theplanet.co.uk>


Index: amd76xrom.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/amd76xrom.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- amd76xrom.c	16 Nov 2004 18:29:02 -0000	1.18
+++ amd76xrom.c	28 Nov 2004 09:40:39 -0000	1.19
@@ -89,7 +89,7 @@
 	static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
 	u8 byte;
 	struct amd76xrom_window *window = &amd76xrom_window;
-	struct amd76xrom_map_info *map = 0;
+	struct amd76xrom_map_info *map = NULL;
 	unsigned long map_top;
 
 	/* Remember the pci dev I find the window in */
@@ -244,7 +244,7 @@
 		map->mtd->owner = THIS_MODULE;
 		if (add_mtd_device(map->mtd)) {
 			map_destroy(map->mtd);
-			map->mtd = 0;
+			map->mtd = NULL;
 			goto out;
 		}
 
@@ -254,7 +254,7 @@
 
 		/* File away the map structure */
 		list_add(&map->list, &window->maps);
-		map = 0;
+		map = NULL;
 	}
 
  out:

Index: dilnetpc.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/dilnetpc.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- dilnetpc.c	4 Nov 2004 13:24:14 -0000	1.16
+++ dilnetpc.c	28 Nov 2004 09:40:39 -0000	1.17
@@ -430,7 +430,7 @@
 			mymtd->erasesize = 0x10000;
 
 	if (!mymtd) {
-		iounmap((void *)dnpc_map.virt);
+		iounmap(dnpc_map.virt);
 		return -ENXIO;
 	}
 		
@@ -481,9 +481,9 @@
 		map_destroy(mymtd);
 	}
 	if (dnpc_map.virt) {
-		iounmap((void *)dnpc_map.virt);
+		iounmap(dnpc_map.virt);
 		dnpc_unmap_flash();
-		dnpc_map.virt = 0;
+		dnpc_map.virt = NULL;
 	}
 }
 

Index: ebony.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/ebony.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ebony.c	4 Nov 2004 13:24:14 -0000	1.13
+++ ebony.c	28 Nov 2004 09:40:39 -0000	1.14
@@ -64,7 +64,7 @@
 int __init init_ebony(void)
 {
 	u8 fpga0_reg;
-	u8 *fpga0_adr;
+	u8 __iomem *fpga0_adr;
 	unsigned long long small_flash_base, large_flash_base;
 
 	fpga0_adr = ioremap64(EBONY_FPGA_ADDR, 16);
@@ -114,8 +114,7 @@
 	}
 
 	ebony_large_map.phys = large_flash_base;
-	ebony_large_map.virt =
-		(unsigned long)ioremap64(large_flash_base,
+	ebony_large_map.virt = ioremap64(large_flash_base,
 					 ebony_large_map.size);
 
 	if (!ebony_large_map.virt) {
@@ -146,13 +145,13 @@
 	}
 
 	if (ebony_small_map.virt) {
-		iounmap((void *)ebony_small_map.virt);
-		ebony_small_map.virt = 0;
+		iounmap(ebony_small_map.virt);
+		ebony_small_map.virt = NULL;
 	}
 
 	if (ebony_large_map.virt) {
-		iounmap((void *)ebony_large_map.virt);
-		ebony_large_map.virt = 0;
+		iounmap(ebony_large_map.virt);
+		ebony_large_map.virt = NULL;
 	}
 }
 

Index: elan-104nc.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/elan-104nc.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- elan-104nc.c	16 Nov 2004 18:29:02 -0000	1.24
+++ elan-104nc.c	28 Nov 2004 09:40:39 -0000	1.25
@@ -182,7 +182,7 @@
 		map_destroy( all_mtd );
 	}
 
-	iounmap((void *)iomapadr);
+	iounmap(iomapadr);
 }
 
 static int __init init_elan_104nc(void)

Index: ichxrom.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/ichxrom.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ichxrom.c	16 Nov 2004 18:29:02 -0000	1.15
+++ ichxrom.c	28 Nov 2004 09:40:39 -0000	1.16
@@ -89,7 +89,7 @@
 {
 	static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
 	struct ichxrom_window *window = &ichxrom_window;
-	struct ichxrom_map_info *map = 0;
+	struct ichxrom_map_info *map = NULL;
 	unsigned long map_top;
 	u8 byte;
 	u16 word;
@@ -291,7 +291,7 @@
 		map->mtd->owner = THIS_MODULE;
 		if (add_mtd_device(map->mtd)) {
 			map_destroy(map->mtd);
-			map->mtd = 0;
+			map->mtd = NULL;
 			goto out;
 		}
 
@@ -301,7 +301,7 @@
 
 		/* File away the map structure */
 		list_add(&map->list, &window->maps);
-		map = 0;
+		map = NULL;
 	}
 
  out:

Index: l440gx.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/l440gx.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- l440gx.c	16 Nov 2004 18:29:02 -0000	1.16
+++ l440gx.c	28 Nov 2004 09:40:39 -0000	1.17
@@ -103,7 +103,7 @@
 		/* Allocate the resource region */
 		if (pci_assign_resource(pm_dev, PIIXE_IOBASE_RESOURCE) != 0) {
 			printk(KERN_WARNING "Could not allocate pm iobase resource\n");
-			iounmap((void *)l440gx_map.virt);
+			iounmap(l440gx_map.virt);
 			return -ENXIO;
 		}
 	}
@@ -137,7 +137,7 @@
 		return 0;
 	}
 
-	iounmap((void *)l440gx_map.virt);
+	iounmap(l440gx_map.virt);
 	return -ENXIO;
 }
 
@@ -146,7 +146,7 @@
 	del_mtd_device(mymtd);
 	map_destroy(mymtd);
 	
-	iounmap((void *)l440gx_map.virt);
+	iounmap(l440gx_map.virt);
 }
 
 module_init(init_l440gx);

Index: netsc520.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/netsc520.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- netsc520.c	4 Nov 2004 13:24:15 -0000	1.12
+++ netsc520.c	28 Nov 2004 09:40:40 -0000	1.13
@@ -111,7 +111,7 @@
 		mymtd = do_map_probe("map_rom", &netsc520_map);
 
 	if (!mymtd) {
-		iounmap((void *)netsc520_map.virt);
+		iounmap(netsc520_map.virt);
 		return -ENXIO;
 	}
 		
@@ -127,8 +127,8 @@
 		map_destroy(mymtd);
 	}
 	if (netsc520_map.virt) {
-		iounmap((void *)netsc520_map.virt);
-		netsc520_map.virt = 0;
+		iounmap(netsc520_map.virt);
+		netsc520_map.virt = NULL;
 	}
 }
 

Index: nettel.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/nettel.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- nettel.c	4 Nov 2004 13:24:15 -0000	1.8
+++ nettel.c	28 Nov 2004 09:40:40 -0000	1.9
@@ -471,8 +471,8 @@
 		map_destroy(amd_mtd);
 	}
 	if (nettel_amd_map.virt) {
-		iounmap((void *)nettel_amd_map.virt);
-		nettel_amd_map.virt = 0;
+		iounmap(nettel_amd_map.virt);
+		nettel_amd_map.virt = NULL;
 	}
 #ifdef CONFIG_MTD_CFI_INTELEXT
 	if (intel_mtd) {

Index: pci.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/pci.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- pci.c	12 Jul 2004 22:38:29 -0000	1.8
+++ pci.c	28 Nov 2004 09:40:40 -0000	1.9
@@ -33,7 +33,7 @@
 
 struct map_pci_info {
 	struct map_info map;
-	void *base;
+	void __iomem *base;
 	void (*exit)(struct pci_dev *dev, struct map_pci_info *map);
 	unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs);
 	struct pci_dev *dev;
@@ -143,7 +143,7 @@
 intel_iq80310_exit(struct pci_dev *dev, struct map_pci_info *map)
 {
 	if (map->base)
-		iounmap((void *)map->base);
+		iounmap(map->base);
 	pci_write_config_dword(dev, 0x44, map->map.map_priv_2);
 }
 
@@ -236,7 +236,7 @@
 	u32 val;
 
 	if (map->base)
-		iounmap((void *)map->base);
+		iounmap(map->base);
 
 	/*
 	 * We need to undo the PCI BAR2/PCI ROM BAR address alteration.

Index: physmap.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/physmap.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- physmap.c	4 Nov 2004 13:24:15 -0000	1.36
+++ physmap.c	28 Nov 2004 09:40:40 -0000	1.37
@@ -92,7 +92,7 @@
 		return 0;
 	}
 
-	iounmap((void *)physmap_map.virt);
+	iounmap(physmap_map.virt);
 	return -ENXIO;
 }
 
@@ -112,8 +112,8 @@
 #endif
 	map_destroy(mymtd);
 
-	iounmap((void *)physmap_map.virt);
-	physmap_map.virt = 0;
+	iounmap(physmap_map.virt);
+	physmap_map.virt = NULL;
 }
 
 module_init(init_physmap);

Index: sbc_gxx.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/sbc_gxx.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- sbc_gxx.c	16 Nov 2004 18:29:02 -0000	1.32
+++ sbc_gxx.c	28 Nov 2004 09:40:40 -0000	1.33
@@ -189,7 +189,7 @@
 		map_destroy( all_mtd );
 	}
 
-	iounmap((void *)iomapadr);
+	iounmap(iomapadr);
 	release_region(PAGE_IO,PAGE_IO_SIZE);
 }
 
@@ -206,7 +206,7 @@
 		printk( KERN_ERR"%s: IO ports 0x%x-0x%x in use\n",
 			sbc_gxx_map.name,
 			PAGE_IO, PAGE_IO+PAGE_IO_SIZE-1 );
-		iounmap((void *)iomapadr);
+		iounmap(iomapadr);
 		return -EAGAIN;
 	}
 		

Index: sc520cdp.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/sc520cdp.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- sc520cdp.c	4 Nov 2004 13:24:15 -0000	1.18
+++ sc520cdp.c	28 Nov 2004 09:40:40 -0000	1.19
@@ -186,12 +186,12 @@
 
 static void sc520cdp_setup_par(void)
 {
-	volatile unsigned long *mmcr;
+	volatile unsigned long __iomem *mmcr;
 	unsigned long mmcr_val;
 	int i, j;
 
 	/* map in SC520's MMCR area */
-	mmcr = (unsigned long *)ioremap_nocache(SC520_MMCR_BASE, SC520_MMCR_EXTENT);
+	mmcr = ioremap_nocache(SC520_MMCR_BASE, SC520_MMCR_EXTENT);
 	if(!mmcr) { /* ioremap_nocache failed: skip the PAR reprogramming */
 		/* force physical address fields to BIOS defaults: */
 		for(i = 0; i < NUM_FLASH_BANKS; i++)
@@ -223,7 +223,7 @@
 			sc520cdp_map[i].phys = par_table[i].default_address;
 		}
 	}
-	iounmap((void *)mmcr);
+	iounmap(mmcr);
 }
 #endif
 
@@ -261,7 +261,7 @@
 			++devices_found;
 		}
 		else {
-			iounmap((void *)sc520cdp_map[i].virt);
+			iounmap(sc520cdp_map[i].virt);
 		}
 	}
 	if(devices_found >= 2) {
@@ -290,8 +290,8 @@
 		if (mymtd[i])
 			map_destroy(mymtd[i]);
 		if (sc520cdp_map[i].virt) {
-			iounmap((void *)sc520cdp_map[i].virt);
-			sc520cdp_map[i].virt = 0;
+			iounmap(sc520cdp_map[i].virt);
+			sc520cdp_map[i].virt = NULL;
 		}
 	}
 }

Index: scb2_flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/scb2_flash.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- scb2_flash.c	16 Nov 2004 18:29:02 -0000	1.10
+++ scb2_flash.c	28 Nov 2004 09:40:40 -0000	1.11
@@ -62,7 +62,7 @@
 #define SCB2_WINDOW	0x00100000
 
 
-static void *scb2_ioaddr;
+static void __iomem *scb2_ioaddr;
 static struct mtd_info *scb2_mtd;
 static struct map_info scb2_map = {
 	.name =      "SCB2 BIOS Flash",
@@ -163,7 +163,7 @@
 	}
 
 	scb2_map.phys = SCB2_ADDR;
-	scb2_map.virt = (void __iomem *)scb2_ioaddr;
+	scb2_map.virt = scb2_ioaddr;
 	scb2_map.size = SCB2_WINDOW;
 
 	simple_map_init(&scb2_map);

Index: scx200_docflash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/scx200_docflash.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- scx200_docflash.c	16 Nov 2004 18:29:02 -0000	1.9
+++ scx200_docflash.c	28 Nov 2004 09:40:40 -0000	1.10
@@ -190,7 +190,7 @@
 	mymtd = do_map_probe(flashtype, &scx200_docflash_map);
 	if (!mymtd) {
 		printk(KERN_ERR NAME ": unable to detect flash\n");
-		iounmap((void *)scx200_docflash_map.virt);
+		iounmap(scx200_docflash_map.virt);
 		release_resource(&docmem);
 		return -ENXIO;
 	}
@@ -221,7 +221,7 @@
 		map_destroy(mymtd);
 	}
 	if (scx200_docflash_map.virt) {
-		iounmap((void *)scx200_docflash_map.virt);
+		iounmap(scx200_docflash_map.virt);
 		release_resource(&docmem);
 	}
 }

Index: ts5500_flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/ts5500_flash.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ts5500_flash.c	20 Sep 2004 15:33:26 -0000	1.1
+++ ts5500_flash.c	28 Nov 2004 09:40:40 -0000	1.2
@@ -79,7 +79,7 @@
 {
 	int rc = 0;
 
-	ts5500_map.virt = (void*)ioremap_nocache(ts5500_map.phys, ts5500_map.size);
+	ts5500_map.virt = ioremap_nocache(ts5500_map.phys, ts5500_map.size);
 
 	if(!ts5500_map.virt) {
 		printk(KERN_ERR "Failed to ioremap_nocache\n");
@@ -110,7 +110,7 @@
 err_out_map:
 	map_destroy(mymtd);
 err_out_ioremap:
-	iounmap((void *)ts5500_map.virt);
+	iounmap(ts5500_map.virt);
 
 	return rc;
 }
@@ -127,8 +127,8 @@
 	}
 
 	if (ts5500_map.virt) {
-		iounmap((void *)ts5500_map.virt);
-		ts5500_map.virt = 0;
+		iounmap(ts5500_map.virt);
+		ts5500_map.virt = NULL;
 	}
 }
 





More information about the linux-mtd-cvs mailing list