floppy: consolidate the dummy fd_cacheflush definition
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Jul 2017 14:12:05 +0000 (16:12 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 19 Oct 2017 14:37:08 +0000 (16:37 +0200)
Only mips defines this helper, so remove all the other arch definitions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
arch/alpha/include/asm/floppy.h
arch/powerpc/include/asm/floppy.h
arch/sparc/include/asm/floppy_32.h
arch/sparc/include/asm/floppy_64.h
drivers/block/floppy.c

index bae97eb19d269dd8cf7b8008ddb9833aab68abfd..942924756cf2150750421ef7ad872cf52228e83b 100644 (file)
@@ -24,7 +24,6 @@
 #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA,count)
 #define fd_enable_irq()         enable_irq(FLOPPY_IRQ)
 #define fd_disable_irq()        disable_irq(FLOPPY_IRQ)
-#define fd_cacheflush(addr,size) /* nothing */
 #define fd_request_irq()        request_irq(FLOPPY_IRQ, floppy_interrupt,\
                                            0, "floppy", NULL)
 #define fd_free_irq()           free_irq(FLOPPY_IRQ, NULL)
@@ -62,7 +61,6 @@ alpha_fd_dma_setup(char *addr, unsigned long size, int mode, int io)
        prev_dir = dir;
 
        fd_clear_dma_ff();
-       fd_cacheflush(addr, size);
        fd_set_dma_mode(mode);
        set_dma_addr(FLOPPY_DMA, bus_addr);
        fd_set_dma_count(size);
index 936a904ae78c6c0712127de3b15d23ab5a5c0b18..167c44b588487005e07f2bb5ae9e2db5290277ad 100644 (file)
@@ -25,7 +25,6 @@
 #define fd_get_dma_residue()    fd_ops->_get_dma_residue(FLOPPY_DMA)
 #define fd_enable_irq()         enable_irq(FLOPPY_IRQ)
 #define fd_disable_irq()        disable_irq(FLOPPY_IRQ)
-#define fd_cacheflush(addr,size) /* nothing */
 #define fd_free_irq()           free_irq(FLOPPY_IRQ, NULL);
 
 #include <linux/pci.h>
@@ -152,7 +151,6 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
        prev_dir = dir;
 
        fd_clear_dma_ff();
-       fd_cacheflush(addr, size);
        fd_set_dma_mode(mode);
        set_dma_addr(FLOPPY_DMA, bus_addr);
        fd_set_dma_count(size);
index 071b83e52f15db4305961b46903deb463c443b39..dab58525229e7322cc0b9783d812f7cea2ed5924 100644 (file)
@@ -70,7 +70,6 @@ static struct sun_floppy_ops sun_fdops;
 #define fd_set_dma_count(count)   sun_fd_set_dma_count(count)
 #define fd_enable_irq()           /* nothing... */
 #define fd_disable_irq()          /* nothing... */
-#define fd_cacheflush(addr, size) /* nothing... */
 #define fd_request_irq()          sun_fd_request_irq()
 #define fd_free_irq()             /* nothing... */
 #if 0  /* P3: added by Alain, these cause a MMU corruption. 19960524 XXX */
index 625756406a7ed6119fae262147560a142bd75407..a1db35a22c99847496eb9195ed664419118a413d 100644 (file)
@@ -72,7 +72,6 @@ static struct sun_floppy_ops sun_fdops;
 #define fd_set_dma_addr(addr)     sun_fdops.fd_set_dma_addr(addr)
 #define fd_set_dma_count(count)   sun_fdops.fd_set_dma_count(count)
 #define get_dma_residue(x)        sun_fdops.get_dma_residue()
-#define fd_cacheflush(addr, size) /* nothing... */
 #define fd_request_irq()          sun_fdops.fd_request_irq()
 #define fd_free_irq()             sun_fdops.fd_free_irq()
 #define fd_eject(drive)           sun_fdops.fd_eject(drive)
index 60c086a536094d4c19ad31a023d49274d54c3dd5..a54183935aa1a7562e328e34be5de94ced530fb2 100644 (file)
@@ -275,6 +275,10 @@ static int set_next_request(void);
 #define fd_dma_mem_alloc(size) __get_dma_pages(GFP_KERNEL, get_order(size))
 #endif
 
+#ifndef fd_cacheflush
+#define fd_cacheflush(addr, size) /* nothing... */
+#endif
+
 static inline void fallback_on_nodma_alloc(char **addr, size_t l)
 {
 #ifdef FLOPPY_CAN_FALLBACK_ON_NODMA