Commit de5952e9 authored by Martin Bligh's avatar Martin Bligh Committed by James Bottomley

[SCSI] megaraid: fix compiler warnings

The user ioctl mailbox can only support a 32 bit address for the
commands structure.  This is fine, since the area it's pointing to is
allocated with pci_alloc_consistent(), so it should be physically <
4GB.  Thus kill the ptr to u32 conversion warnings on 64 bit.
Signed-off-by: default avatarMartin J. Bligh <mbligh@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatar"Patro, Sumant" <Sumant.Patro@lsi.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent c6a6c81c
...@@ -3571,7 +3571,7 @@ megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, ...@@ -3571,7 +3571,7 @@ megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
/* /*
* The user passthru structure * The user passthru structure
*/ */
upthru = (mega_passthru __user *)MBOX(uioc)->xferaddr; upthru = (mega_passthru __user *)(unsigned long)MBOX(uioc)->xferaddr;
/* /*
* Copy in the user passthru here. * Copy in the user passthru here.
...@@ -3623,7 +3623,7 @@ megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, ...@@ -3623,7 +3623,7 @@ megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
/* /*
* Get the user data * Get the user data
*/ */
if( copy_from_user(data, (char __user *)uxferaddr, if( copy_from_user(data, (char __user *)(unsigned long) uxferaddr,
pthru->dataxferlen) ) { pthru->dataxferlen) ) {
rval = (-EFAULT); rval = (-EFAULT);
goto freemem_and_return; goto freemem_and_return;
...@@ -3649,7 +3649,7 @@ megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, ...@@ -3649,7 +3649,7 @@ megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
* Is data going up-stream * Is data going up-stream
*/ */
if( pthru->dataxferlen && (uioc.flags & UIOC_RD) ) { if( pthru->dataxferlen && (uioc.flags & UIOC_RD) ) {
if( copy_to_user((char __user *)uxferaddr, data, if( copy_to_user((char __user *)(unsigned long) uxferaddr, data,
pthru->dataxferlen) ) { pthru->dataxferlen) ) {
rval = (-EFAULT); rval = (-EFAULT);
} }
...@@ -3702,7 +3702,7 @@ megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, ...@@ -3702,7 +3702,7 @@ megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
/* /*
* Get the user data * Get the user data
*/ */
if( copy_from_user(data, (char __user *)uxferaddr, if( copy_from_user(data, (char __user *)(unsigned long) uxferaddr,
uioc.xferlen) ) { uioc.xferlen) ) {
pci_free_consistent(pdev, pci_free_consistent(pdev,
...@@ -3742,7 +3742,7 @@ megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, ...@@ -3742,7 +3742,7 @@ megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
* Is data going up-stream * Is data going up-stream
*/ */
if( uioc.xferlen && (uioc.flags & UIOC_RD) ) { if( uioc.xferlen && (uioc.flags & UIOC_RD) ) {
if( copy_to_user((char __user *)uxferaddr, data, if( copy_to_user((char __user *)(unsigned long) uxferaddr, data,
uioc.xferlen) ) { uioc.xferlen) ) {
rval = (-EFAULT); rval = (-EFAULT);
......
Markdown is supported
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