From: Arnd Bergmann Date: Tue, 8 Dec 2015 15:22:17 +0000 (+0100) Subject: nvme: fix another 32-bit build warning X-Git-Tag: v4.1.12-102.0.20170601_1400~171 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=450697af05b54c0c6f74790e1de3ffe36db972be;p=users%2Fjedix%2Flinux-maple.git nvme: fix another 32-bit build warning The nvme_user_cmd function was recently moved around from one file to another, which made a warning reappear that I had fixed before at some point: drivers/nvme/host/core.c: In function 'nvme_user_cmd': drivers/nvme/host/core.c:424:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] This applies the same workaround that we have elsewhere in the driver with an extra type cast to uintptr_t. Signed-off-by: Arnd Bergmann Fixes: 1673f1f08c88 ("nvme: move block_device_operations and ns/ctrl freeing to common code") Link: https://lkml.org/lkml/2015/10/9/611 Signed-off-by: Jens Axboe Orabug: 25130845 Signed-off-by: Ashok Vairavan Reviewed-by: Martin K. Petersen --- diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 40f1c9aa32bfc..c634f8d092112 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -418,7 +418,7 @@ static int nvme_user_cmd(struct nvme_ctrl *ctrl, struct nvme_ns *ns, timeout = msecs_to_jiffies(cmd.timeout_ms); status = nvme_submit_user_cmd(ns ? ns->queue : ctrl->admin_q, &c, - (void __user *)cmd.addr, cmd.data_len, + (void __user *)(uintptr_t)cmd.addr, cmd.data_len, &cmd.result, timeout); if (status >= 0) { if (put_user(cmd.result, &ucmd->result))