public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: fix another 32-bit build warning
@ 2015-12-08 15:22 Arnd Bergmann
  2015-12-08 19:15 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2015-12-08 15:22 UTC (permalink / raw)
  To: linux-nvme, linux-kernel; +Cc: Christoph Hellwig, Keith Busch, Jens Axboe

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 <arnd@arndb.de>
Fixes: 1673f1f08c88 ("nvme: move block_device_operations and ns/ctrl freeing to common code")
Link: https://lkml.org/lkml/2015/10/9/611
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index f9c4e80c2441..47ebfb85b14b 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -421,7 +421,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))
-- 
2.1.0.rc2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nvme: fix another 32-bit build warning
  2015-12-08 15:22 [PATCH] nvme: fix another 32-bit build warning Arnd Bergmann
@ 2015-12-08 19:15 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2015-12-08 19:15 UTC (permalink / raw)
  To: Arnd Bergmann, linux-nvme, linux-kernel; +Cc: Christoph Hellwig, Keith Busch

On 12/08/2015 08:22 AM, Arnd Bergmann wrote:
> 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.

Applied to for-4.5/nvme, thanks Arnd.



-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-08 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-08 15:22 [PATCH] nvme: fix another 32-bit build warning Arnd Bergmann
2015-12-08 19:15 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox