Skip to content
Commit 00769ec4 authored by Jeff Garzik's avatar Jeff Garzik Committed by James Bottomley
Browse files

[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: default avatarJeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent e42ebefe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment