[POC][PATCH 23/83] fd_dma_mem_free(): pass address as void * instead of unsigned long

2015-12-21 Thread Al Viro
From: Al Viro 

Signed-off-by: Al Viro 
---
 arch/m68k/include/asm/floppy.h  |  4 ++--
 arch/mips/include/asm/mach-generic/floppy.h |  4 ++--
 arch/mips/include/asm/mach-jazz/floppy.h|  6 +++---
 arch/parisc/include/asm/floppy.h|  6 +++---
 arch/sparc/include/asm/floppy_32.h  |  2 +-
 arch/x86/include/asm/floppy.h   |  6 +++---
 drivers/block/floppy.c  | 10 +-
 7 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/arch/m68k/include/asm/floppy.h b/arch/m68k/include/asm/floppy.h
index 47365b1..b5fb689 100644
--- a/arch/m68k/include/asm/floppy.h
+++ b/arch/m68k/include/asm/floppy.h
@@ -147,9 +147,9 @@ static unsigned long vdma_mem_alloc(unsigned long size)
 
 }
 
-static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
+static void _fd_dma_mem_free(void *addr, unsigned long size)
 {
-vfree((void *)addr);
+vfree(addr);
 }
 #define fd_dma_mem_free(addr,size) _fd_dma_mem_free(addr, size)
 
diff --git a/arch/mips/include/asm/mach-generic/floppy.h 
b/arch/mips/include/asm/mach-generic/floppy.h
index 7b0b508..1419f0d 100644
--- a/arch/mips/include/asm/mach-generic/floppy.h
+++ b/arch/mips/include/asm/mach-generic/floppy.h
@@ -122,9 +122,9 @@ static inline unsigned long fd_dma_mem_alloc(unsigned long 
size)
return mem;
 }
 
-static inline void fd_dma_mem_free(unsigned long addr, unsigned long size)
+static inline void fd_dma_mem_free(void *addr, unsigned long size)
 {
-   free_pages((void *)addr, get_order(size));
+   free_pages(addr, get_order(size));
 }
 
 static inline unsigned long fd_drive_type(unsigned long n)
diff --git a/arch/mips/include/asm/mach-jazz/floppy.h 
b/arch/mips/include/asm/mach-jazz/floppy.h
index 4aaf35b..701dbfc 100644
--- a/arch/mips/include/asm/mach-jazz/floppy.h
+++ b/arch/mips/include/asm/mach-jazz/floppy.h
@@ -114,10 +114,10 @@ static inline unsigned long fd_dma_mem_alloc(unsigned 
long size)
return mem;
 }
 
-static inline void fd_dma_mem_free(unsigned long addr, unsigned long size)
+static inline void fd_dma_mem_free(void *addr, unsigned long size)
 {
-   vdma_free(vdma_phys2log(CPHYSADDR(addr)));
-   free_pages((void *)addr, get_order(size));
+   vdma_free(vdma_phys2log(CPHYSADDR((unsigned long)addr)));
+   free_pages(addr, get_order(size));
 }
 
 static inline unsigned long fd_drive_type(unsigned long n)
diff --git a/arch/parisc/include/asm/floppy.h b/arch/parisc/include/asm/floppy.h
index ce08762..21ea40c 100644
--- a/arch/parisc/include/asm/floppy.h
+++ b/arch/parisc/include/asm/floppy.h
@@ -177,12 +177,12 @@ static unsigned long vdma_mem_alloc(unsigned long size)
 
 #define nodma_mem_alloc(size) vdma_mem_alloc(size)
 
-static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
+static void _fd_dma_mem_free(void *addr, unsigned long size)
 {
if((unsigned int) addr >= (unsigned int) high_memory)
-   return vfree((void *)addr);
+   return vfree(addr);
else
-   free_pages((void *)addr, get_order(size));  
+   free_pages(addr, get_order(size));  
 }
 
 #define fd_dma_mem_free(addr, size)  _fd_dma_mem_free(addr, size) 
diff --git a/arch/sparc/include/asm/floppy_32.h 
b/arch/sparc/include/asm/floppy_32.h
index 071b83e..dd7aa7c 100644
--- a/arch/sparc/include/asm/floppy_32.h
+++ b/arch/sparc/include/asm/floppy_32.h
@@ -75,7 +75,7 @@ static struct sun_floppy_ops sun_fdops;
 #define fd_free_irq() /* nothing... */
 #if 0  /* P3: added by Alain, these cause a MMU corruption. 19960524 XXX */
 #define fd_dma_mem_alloc(size)((unsigned long) vmalloc(size))
-#define fd_dma_mem_free(addr,size) (vfree((void *)(addr)))
+#define fd_dma_mem_free(addr,size) (vfree((addr)))
 #endif
 
 /* XXX This isn't really correct. XXX */
diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h
index 8203e1d..31718b2 100644
--- a/arch/x86/include/asm/floppy.h
+++ b/arch/x86/include/asm/floppy.h
@@ -165,12 +165,12 @@ static unsigned long vdma_mem_alloc(unsigned long size)
 
 #define nodma_mem_alloc(size) vdma_mem_alloc(size)
 
-static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
+static void _fd_dma_mem_free(void *addr, unsigned long size)
 {
if ((unsigned long)addr >= (unsigned long)high_memory)
-   vfree((void *)addr);
+   vfree(addr);
else
-   free_pages((void *)addr, get_order(size));
+   free_pages(addr, get_order(size));
 }
 
 #define fd_dma_mem_free(addr, size)  _fd_dma_mem_free(addr, size)
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index e2738be..9f36da8 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -267,7 +267,7 @@ static int set_next_request(void);
 /* Dma Memory related stuff */
 
 #ifndef fd_dma_mem_free
-#define fd_dma_mem_free(addr, size) free_pages((void *)addr, get_order(size))
+#define 

[POC][PATCH 23/83] fd_dma_mem_free(): pass address as void * instead of unsigned long

2015-12-21 Thread Al Viro
From: Al Viro 

Signed-off-by: Al Viro 
---
 arch/m68k/include/asm/floppy.h  |  4 ++--
 arch/mips/include/asm/mach-generic/floppy.h |  4 ++--
 arch/mips/include/asm/mach-jazz/floppy.h|  6 +++---
 arch/parisc/include/asm/floppy.h|  6 +++---
 arch/sparc/include/asm/floppy_32.h  |  2 +-
 arch/x86/include/asm/floppy.h   |  6 +++---
 drivers/block/floppy.c  | 10 +-
 7 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/arch/m68k/include/asm/floppy.h b/arch/m68k/include/asm/floppy.h
index 47365b1..b5fb689 100644
--- a/arch/m68k/include/asm/floppy.h
+++ b/arch/m68k/include/asm/floppy.h
@@ -147,9 +147,9 @@ static unsigned long vdma_mem_alloc(unsigned long size)
 
 }
 
-static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
+static void _fd_dma_mem_free(void *addr, unsigned long size)
 {
-vfree((void *)addr);
+vfree(addr);
 }
 #define fd_dma_mem_free(addr,size) _fd_dma_mem_free(addr, size)
 
diff --git a/arch/mips/include/asm/mach-generic/floppy.h 
b/arch/mips/include/asm/mach-generic/floppy.h
index 7b0b508..1419f0d 100644
--- a/arch/mips/include/asm/mach-generic/floppy.h
+++ b/arch/mips/include/asm/mach-generic/floppy.h
@@ -122,9 +122,9 @@ static inline unsigned long fd_dma_mem_alloc(unsigned long 
size)
return mem;
 }
 
-static inline void fd_dma_mem_free(unsigned long addr, unsigned long size)
+static inline void fd_dma_mem_free(void *addr, unsigned long size)
 {
-   free_pages((void *)addr, get_order(size));
+   free_pages(addr, get_order(size));
 }
 
 static inline unsigned long fd_drive_type(unsigned long n)
diff --git a/arch/mips/include/asm/mach-jazz/floppy.h 
b/arch/mips/include/asm/mach-jazz/floppy.h
index 4aaf35b..701dbfc 100644
--- a/arch/mips/include/asm/mach-jazz/floppy.h
+++ b/arch/mips/include/asm/mach-jazz/floppy.h
@@ -114,10 +114,10 @@ static inline unsigned long fd_dma_mem_alloc(unsigned 
long size)
return mem;
 }
 
-static inline void fd_dma_mem_free(unsigned long addr, unsigned long size)
+static inline void fd_dma_mem_free(void *addr, unsigned long size)
 {
-   vdma_free(vdma_phys2log(CPHYSADDR(addr)));
-   free_pages((void *)addr, get_order(size));
+   vdma_free(vdma_phys2log(CPHYSADDR((unsigned long)addr)));
+   free_pages(addr, get_order(size));
 }
 
 static inline unsigned long fd_drive_type(unsigned long n)
diff --git a/arch/parisc/include/asm/floppy.h b/arch/parisc/include/asm/floppy.h
index ce08762..21ea40c 100644
--- a/arch/parisc/include/asm/floppy.h
+++ b/arch/parisc/include/asm/floppy.h
@@ -177,12 +177,12 @@ static unsigned long vdma_mem_alloc(unsigned long size)
 
 #define nodma_mem_alloc(size) vdma_mem_alloc(size)
 
-static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
+static void _fd_dma_mem_free(void *addr, unsigned long size)
 {
if((unsigned int) addr >= (unsigned int) high_memory)
-   return vfree((void *)addr);
+   return vfree(addr);
else
-   free_pages((void *)addr, get_order(size));  
+   free_pages(addr, get_order(size));  
 }
 
 #define fd_dma_mem_free(addr, size)  _fd_dma_mem_free(addr, size) 
diff --git a/arch/sparc/include/asm/floppy_32.h 
b/arch/sparc/include/asm/floppy_32.h
index 071b83e..dd7aa7c 100644
--- a/arch/sparc/include/asm/floppy_32.h
+++ b/arch/sparc/include/asm/floppy_32.h
@@ -75,7 +75,7 @@ static struct sun_floppy_ops sun_fdops;
 #define fd_free_irq() /* nothing... */
 #if 0  /* P3: added by Alain, these cause a MMU corruption. 19960524 XXX */
 #define fd_dma_mem_alloc(size)((unsigned long) vmalloc(size))
-#define fd_dma_mem_free(addr,size) (vfree((void *)(addr)))
+#define fd_dma_mem_free(addr,size) (vfree((addr)))
 #endif
 
 /* XXX This isn't really correct. XXX */
diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h
index 8203e1d..31718b2 100644
--- a/arch/x86/include/asm/floppy.h
+++ b/arch/x86/include/asm/floppy.h
@@ -165,12 +165,12 @@ static unsigned long vdma_mem_alloc(unsigned long size)
 
 #define nodma_mem_alloc(size) vdma_mem_alloc(size)
 
-static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
+static void _fd_dma_mem_free(void *addr, unsigned long size)
 {
if ((unsigned long)addr >= (unsigned long)high_memory)
-   vfree((void *)addr);
+   vfree(addr);
else
-   free_pages((void *)addr, get_order(size));
+   free_pages(addr, get_order(size));
 }
 
 #define fd_dma_mem_free(addr, size)  _fd_dma_mem_free(addr, size)
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index e2738be..9f36da8 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -267,7 +267,7 @@ static int set_next_request(void);
 /* Dma Memory related stuff */
 
 #ifndef fd_dma_mem_free
-#define fd_dma_mem_free(addr, size) free_pages((void