From 00769ec40074b753c9b218c2ccaba2bfbfffe056 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sun, 3 Dec 2006 20:49:23 -0500 Subject: [SCSI] megaraid: fix MMIO casts megaraid's MMIO RD*/WR* macros directly call readl() and writel() with an 'unsigned long' argument. This throws a warning, but is otherwise OK because the 'unsigned long' is really the result of ioremap(). This setup is also OK because the variable can hold an ioremap cookie /or/ a PCI I/O port (PIO). However, to fix the warning thrown when readl() and writel() are passed an unsigned long cookie, I introduce 'void __iomem *mmio_base', holding the same value as 'base'. This will silence the warnings, and also cause an oops whenever these MMIO-only functions are ever accidentally passed an I/O address. Signed-off-by: Jeff Garzik Signed-off-by: James Bottomley --- drivers/scsi/megaraid.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/megaraid.h') diff --git a/drivers/scsi/megaraid.h b/drivers/scsi/megaraid.h index 66529f11d23c..c6e74643abe2 100644 --- a/drivers/scsi/megaraid.h +++ b/drivers/scsi/megaraid.h @@ -801,7 +801,8 @@ typedef struct { clustering is available */ u32 flag; - unsigned long base; + unsigned long base; + void __iomem *mmio_base; /* mbox64 with mbox not aligned on 16-byte boundry */ mbox64_t *una_mbox64; -- cgit