[PATCH 3.18 61/68] message: i2o: fix 64bit build warnings

Greg Kroah-Hartman
2017-05-05T18:33:55Z

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

It seems that most of the 64bit build warnings were fixed up in this
driver, but 2 were forgotten. This code is long deleted from newer
kernels, so the fix is not needed there, but make it here in the 3.18
tree to keep the build quiet.

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
drivers/message/i2o/i2o_config.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -890,7 +890,7 @@ static int i2o_cfg_passthru(unsigned lon
flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR */ ) {
// TODO 64bit fix
if (copy_from_user
- (p->virt, (void __user *)sg[i].addr_bus,
+ (p->virt, (void __user *)(u64)sg[i].addr_bus,
sg_size)) {
printk(KERN_DEBUG
"%s: Could not copy SG buf %d FROM user\n",
@@ -950,7 +950,7 @@ static int i2o_cfg_passthru(unsigned lon
sg_size = sg[j].flag_count & 0xffffff;
// TODO 64bit fix
if (copy_to_user
- ((void __user *)sg[j].addr_bus, sg_list[j].virt,
+ ((void __user *)(u64)sg[j].addr_bus, sg_list[j].virt,
sg_size)) {
printk(KERN_WARNING
"%s: Could not copy %p TO user %x\n",