* [PATCH] nvme: fix 32-bit build warning
@ 2015-10-06 20:37 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-10-06 20:37 UTC (permalink / raw)
To: Matthew Wilcox
Cc: linux-nvme, linux-kernel, Christoph Hellwig, Jens Axboe,
linux-arm-kernel
Compiling the nvme driver on 32-bit warns about a cast from a __u64
variable to a pointer:
drivers/block/nvme-core.c: In function 'nvme_submit_io':
drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(void __user *)io.addr, length, NULL, 0);
The cast here is intentional and safe, so we can shut up the
gcc warning by adding an intermediate cast to 'unsigned long'.
I had previously submitted a patch to fix this problem in the
nvme driver, but it was accepted on the same day that two new
warnings got added.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: d29ec8241c10e ("nvme: submit internal commands through the block layer")
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index e917cf304ad0..f9faf276ce74 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1844,7 +1844,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
c.rw.metadata = cpu_to_le64(meta_dma);
status = __nvme_submit_sync_cmd(ns->queue, &c, NULL,
- (void __user *)io.addr, length, NULL, 0);
+ (void __user *)(unsigned long)io.addr, length, NULL, 0);
unmap:
if (meta) {
if (status == NVME_SC_SUCCESS && !write) {
@@ -1886,7 +1886,7 @@ static int nvme_user_cmd(struct nvme_dev *dev, struct nvme_ns *ns,
timeout = msecs_to_jiffies(cmd.timeout_ms);
status = __nvme_submit_sync_cmd(ns ? ns->queue : dev->admin_q, &c,
- NULL, (void __user *)cmd.addr, cmd.data_len,
+ NULL, (void __user *)(unsigned long)cmd.addr, cmd.data_len,
&cmd.result, timeout);
if (status >= 0) {
if (put_user(cmd.result, &ucmd->result))
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH] nvme: fix 32-bit build warning
@ 2015-10-06 20:37 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-10-06 20:37 UTC (permalink / raw)
Compiling the nvme driver on 32-bit warns about a cast from a __u64
variable to a pointer:
drivers/block/nvme-core.c: In function 'nvme_submit_io':
drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(void __user *)io.addr, length, NULL, 0);
The cast here is intentional and safe, so we can shut up the
gcc warning by adding an intermediate cast to 'unsigned long'.
I had previously submitted a patch to fix this problem in the
nvme driver, but it was accepted on the same day that two new
warnings got added.
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
Fixes: d29ec8241c10e ("nvme: submit internal commands through the block layer")
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index e917cf304ad0..f9faf276ce74 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1844,7 +1844,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
c.rw.metadata = cpu_to_le64(meta_dma);
status = __nvme_submit_sync_cmd(ns->queue, &c, NULL,
- (void __user *)io.addr, length, NULL, 0);
+ (void __user *)(unsigned long)io.addr, length, NULL, 0);
unmap:
if (meta) {
if (status == NVME_SC_SUCCESS && !write) {
@@ -1886,7 +1886,7 @@ static int nvme_user_cmd(struct nvme_dev *dev, struct nvme_ns *ns,
timeout = msecs_to_jiffies(cmd.timeout_ms);
status = __nvme_submit_sync_cmd(ns ? ns->queue : dev->admin_q, &c,
- NULL, (void __user *)cmd.addr, cmd.data_len,
+ NULL, (void __user *)(unsigned long)cmd.addr, cmd.data_len,
&cmd.result, timeout);
if (status >= 0) {
if (put_user(cmd.result, &ucmd->result))
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH] nvme: fix 32-bit build warning
@ 2015-10-06 20:37 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-10-06 20:37 UTC (permalink / raw)
To: linux-arm-kernel
Compiling the nvme driver on 32-bit warns about a cast from a __u64
variable to a pointer:
drivers/block/nvme-core.c: In function 'nvme_submit_io':
drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(void __user *)io.addr, length, NULL, 0);
The cast here is intentional and safe, so we can shut up the
gcc warning by adding an intermediate cast to 'unsigned long'.
I had previously submitted a patch to fix this problem in the
nvme driver, but it was accepted on the same day that two new
warnings got added.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: d29ec8241c10e ("nvme: submit internal commands through the block layer")
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index e917cf304ad0..f9faf276ce74 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1844,7 +1844,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
c.rw.metadata = cpu_to_le64(meta_dma);
status = __nvme_submit_sync_cmd(ns->queue, &c, NULL,
- (void __user *)io.addr, length, NULL, 0);
+ (void __user *)(unsigned long)io.addr, length, NULL, 0);
unmap:
if (meta) {
if (status == NVME_SC_SUCCESS && !write) {
@@ -1886,7 +1886,7 @@ static int nvme_user_cmd(struct nvme_dev *dev, struct nvme_ns *ns,
timeout = msecs_to_jiffies(cmd.timeout_ms);
status = __nvme_submit_sync_cmd(ns ? ns->queue : dev->admin_q, &c,
- NULL, (void __user *)cmd.addr, cmd.data_len,
+ NULL, (void __user *)(unsigned long)cmd.addr, cmd.data_len,
&cmd.result, timeout);
if (status >= 0) {
if (put_user(cmd.result, &ucmd->result))
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH] nvme: fix 32-bit build warning
2015-10-06 20:37 ` Arnd Bergmann
(?)
@ 2015-10-09 14:42 ` Christoph Hellwig
-1 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2015-10-09 14:42 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Matthew Wilcox, Jens Axboe, linux-arm-kernel, linux-kernel,
linux-nvme, Christoph Hellwig
On Tue, Oct 06, 2015 at 10:37:11PM +0200, Arnd Bergmann wrote:
> Compiling the nvme driver on 32-bit warns about a cast from a __u64
> variable to a pointer:
>
> drivers/block/nvme-core.c: In function 'nvme_submit_io':
> drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> (void __user *)io.addr, length, NULL, 0);
>
> The cast here is intentional and safe, so we can shut up the
> gcc warning by adding an intermediate cast to 'unsigned long'.
It really should be a uintptr_t, which would also avoid the > 80
character lines. I wonder if we need a u64_to_ptr helper given these
ioctl ABIs that pass pointers as a u64 seems to be everywhere these
days.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH] nvme: fix 32-bit build warning
@ 2015-10-09 14:42 ` Christoph Hellwig
0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2015-10-09 14:42 UTC (permalink / raw)
On Tue, Oct 06, 2015@10:37:11PM +0200, Arnd Bergmann wrote:
> Compiling the nvme driver on 32-bit warns about a cast from a __u64
> variable to a pointer:
>
> drivers/block/nvme-core.c: In function 'nvme_submit_io':
> drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> (void __user *)io.addr, length, NULL, 0);
>
> The cast here is intentional and safe, so we can shut up the
> gcc warning by adding an intermediate cast to 'unsigned long'.
It really should be a uintptr_t, which would also avoid the > 80
character lines. I wonder if we need a u64_to_ptr helper given these
ioctl ABIs that pass pointers as a u64 seems to be everywhere these
days.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH] nvme: fix 32-bit build warning
@ 2015-10-09 14:42 ` Christoph Hellwig
0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2015-10-09 14:42 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 06, 2015 at 10:37:11PM +0200, Arnd Bergmann wrote:
> Compiling the nvme driver on 32-bit warns about a cast from a __u64
> variable to a pointer:
>
> drivers/block/nvme-core.c: In function 'nvme_submit_io':
> drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> (void __user *)io.addr, length, NULL, 0);
>
> The cast here is intentional and safe, so we can shut up the
> gcc warning by adding an intermediate cast to 'unsigned long'.
It really should be a uintptr_t, which would also avoid the > 80
character lines. I wonder if we need a u64_to_ptr helper given these
ioctl ABIs that pass pointers as a u64 seems to be everywhere these
days.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] nvme: fix 32-bit build warning
2015-10-09 14:42 ` Christoph Hellwig
(?)
@ 2015-10-09 18:55 ` Arnd Bergmann
-1 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-10-09 18:55 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Matthew Wilcox, Jens Axboe, linux-arm-kernel, linux-kernel,
linux-nvme, Christoph Hellwig
On Friday 09 October 2015 07:42:21 Christoph Hellwig wrote:
> On Tue, Oct 06, 2015 at 10:37:11PM +0200, Arnd Bergmann wrote:
> > Compiling the nvme driver on 32-bit warns about a cast from a __u64
> > variable to a pointer:
> >
> > drivers/block/nvme-core.c: In function 'nvme_submit_io':
> > drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> > (void __user *)io.addr, length, NULL, 0);
> >
> > The cast here is intentional and safe, so we can shut up the
> > gcc warning by adding an intermediate cast to 'unsigned long'.
>
> It really should be a uintptr_t, which would also avoid the > 80
> character lines. I wonder if we need a u64_to_ptr helper given these
> ioctl ABIs that pass pointers as a u64 seems to be everywhere these
> days.
I'll send a new version with uintptr_t for now, but having a proper
interface for this sounds like a good idea.
I've seen a couple of cases like this, and most but not
all actually want a __user pointer like this one. That seems
similar to the common ioctl use case where we want a user pointer
from an 'unsigned long', so we could use the same function for both,
like
static inline void __user *get_uptr(unsigned long arg)
{
return (void __user *)arg;
}
With this definition, you can pass any scalar type (u64 or
unsigned long normally) and get the pointer, and we can
put that into include/linux/uaccess.h.
Arnd
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH] nvme: fix 32-bit build warning
@ 2015-10-09 18:55 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-10-09 18:55 UTC (permalink / raw)
On Friday 09 October 2015 07:42:21 Christoph Hellwig wrote:
> On Tue, Oct 06, 2015@10:37:11PM +0200, Arnd Bergmann wrote:
> > Compiling the nvme driver on 32-bit warns about a cast from a __u64
> > variable to a pointer:
> >
> > drivers/block/nvme-core.c: In function 'nvme_submit_io':
> > drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> > (void __user *)io.addr, length, NULL, 0);
> >
> > The cast here is intentional and safe, so we can shut up the
> > gcc warning by adding an intermediate cast to 'unsigned long'.
>
> It really should be a uintptr_t, which would also avoid the > 80
> character lines. I wonder if we need a u64_to_ptr helper given these
> ioctl ABIs that pass pointers as a u64 seems to be everywhere these
> days.
I'll send a new version with uintptr_t for now, but having a proper
interface for this sounds like a good idea.
I've seen a couple of cases like this, and most but not
all actually want a __user pointer like this one. That seems
similar to the common ioctl use case where we want a user pointer
from an 'unsigned long', so we could use the same function for both,
like
static inline void __user *get_uptr(unsigned long arg)
{
return (void __user *)arg;
}
With this definition, you can pass any scalar type (u64 or
unsigned long normally) and get the pointer, and we can
put that into include/linux/uaccess.h.
Arnd
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH] nvme: fix 32-bit build warning
@ 2015-10-09 18:55 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-10-09 18:55 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 09 October 2015 07:42:21 Christoph Hellwig wrote:
> On Tue, Oct 06, 2015 at 10:37:11PM +0200, Arnd Bergmann wrote:
> > Compiling the nvme driver on 32-bit warns about a cast from a __u64
> > variable to a pointer:
> >
> > drivers/block/nvme-core.c: In function 'nvme_submit_io':
> > drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> > (void __user *)io.addr, length, NULL, 0);
> >
> > The cast here is intentional and safe, so we can shut up the
> > gcc warning by adding an intermediate cast to 'unsigned long'.
>
> It really should be a uintptr_t, which would also avoid the > 80
> character lines. I wonder if we need a u64_to_ptr helper given these
> ioctl ABIs that pass pointers as a u64 seems to be everywhere these
> days.
I'll send a new version with uintptr_t for now, but having a proper
interface for this sounds like a good idea.
I've seen a couple of cases like this, and most but not
all actually want a __user pointer like this one. That seems
similar to the common ioctl use case where we want a user pointer
from an 'unsigned long', so we could use the same function for both,
like
static inline void __user *get_uptr(unsigned long arg)
{
return (void __user *)arg;
}
With this definition, you can pass any scalar type (u64 or
unsigned long normally) and get the pointer, and we can
put that into include/linux/uaccess.h.
Arnd
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v2] nvme: fix 32-bit build warning
2015-10-09 14:42 ` Christoph Hellwig
(?)
@ 2015-10-09 18:58 ` Arnd Bergmann
-1 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-10-09 18:58 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Matthew Wilcox, Jens Axboe, linux-arm-kernel, linux-kernel,
linux-nvme, Christoph Hellwig
>From 877a323df080bda54a71e26ecf20b4244b31a180 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 6 Oct 2015 22:29:48 +0200
Subject: [PATCH] nvme: fix 32-bit build warning
Compiling the nvme driver on 32-bit warns about a cast from a __u64
variable to a pointer:
drivers/block/nvme-core.c: In function 'nvme_submit_io':
drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(void __user *)io.addr, length, NULL, 0);
The cast here is intentional and safe, so we can shut up the
gcc warning by adding an intermediate cast to 'uintptr_t'.
I had previously submitted a patch to fix this problem in the
nvme driver, but it was accepted on the same day that two new
warnings got added.
For clarification, I also change the third instance of this cast
to use uintptr_t instead of unsigned long now.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: d29ec8241c10e ("nvme: submit internal commands through the block layer")
---
v2: use uintptr_t for intermediate cast
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index e917cf304ad0..e8ff16c63977 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1804,7 +1804,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
length = (io.nblocks + 1) << ns->lba_shift;
meta_len = (io.nblocks + 1) * ns->ms;
- metadata = (void __user *)(unsigned long)io.metadata;
+ metadata = (void __user *)(uintptr_t)io.metadata;
write = io.opcode & 1;
if (ns->ext) {
@@ -1844,7 +1844,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
c.rw.metadata = cpu_to_le64(meta_dma);
status = __nvme_submit_sync_cmd(ns->queue, &c, NULL,
- (void __user *)io.addr, length, NULL, 0);
+ (void __user *)(uintptr_t)io.addr, length, NULL, 0);
unmap:
if (meta) {
if (status == NVME_SC_SUCCESS && !write) {
@@ -1886,7 +1886,7 @@ static int nvme_user_cmd(struct nvme_dev *dev, struct nvme_ns *ns,
timeout = msecs_to_jiffies(cmd.timeout_ms);
status = __nvme_submit_sync_cmd(ns ? ns->queue : dev->admin_q, &c,
- NULL, (void __user *)cmd.addr, cmd.data_len,
+ NULL, (void __user *)(uintptr_t)cmd.addr, cmd.data_len,
&cmd.result, timeout);
if (status >= 0) {
if (put_user(cmd.result, &ucmd->result))
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2] nvme: fix 32-bit build warning
@ 2015-10-09 18:58 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-10-09 18:58 UTC (permalink / raw)
>From 877a323df080bda54a71e26ecf20b4244b31a180 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 6 Oct 2015 22:29:48 +0200
Subject: [PATCH] nvme: fix 32-bit build warning
Compiling the nvme driver on 32-bit warns about a cast from a __u64
variable to a pointer:
drivers/block/nvme-core.c: In function 'nvme_submit_io':
drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(void __user *)io.addr, length, NULL, 0);
The cast here is intentional and safe, so we can shut up the
gcc warning by adding an intermediate cast to 'uintptr_t'.
I had previously submitted a patch to fix this problem in the
nvme driver, but it was accepted on the same day that two new
warnings got added.
For clarification, I also change the third instance of this cast
to use uintptr_t instead of unsigned long now.
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
Fixes: d29ec8241c10e ("nvme: submit internal commands through the block layer")
---
v2: use uintptr_t for intermediate cast
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index e917cf304ad0..e8ff16c63977 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1804,7 +1804,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
length = (io.nblocks + 1) << ns->lba_shift;
meta_len = (io.nblocks + 1) * ns->ms;
- metadata = (void __user *)(unsigned long)io.metadata;
+ metadata = (void __user *)(uintptr_t)io.metadata;
write = io.opcode & 1;
if (ns->ext) {
@@ -1844,7 +1844,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
c.rw.metadata = cpu_to_le64(meta_dma);
status = __nvme_submit_sync_cmd(ns->queue, &c, NULL,
- (void __user *)io.addr, length, NULL, 0);
+ (void __user *)(uintptr_t)io.addr, length, NULL, 0);
unmap:
if (meta) {
if (status == NVME_SC_SUCCESS && !write) {
@@ -1886,7 +1886,7 @@ static int nvme_user_cmd(struct nvme_dev *dev, struct nvme_ns *ns,
timeout = msecs_to_jiffies(cmd.timeout_ms);
status = __nvme_submit_sync_cmd(ns ? ns->queue : dev->admin_q, &c,
- NULL, (void __user *)cmd.addr, cmd.data_len,
+ NULL, (void __user *)(uintptr_t)cmd.addr, cmd.data_len,
&cmd.result, timeout);
if (status >= 0) {
if (put_user(cmd.result, &ucmd->result))
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2] nvme: fix 32-bit build warning
@ 2015-10-09 18:58 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-10-09 18:58 UTC (permalink / raw)
To: linux-arm-kernel
>From 877a323df080bda54a71e26ecf20b4244b31a180 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 6 Oct 2015 22:29:48 +0200
Subject: [PATCH] nvme: fix 32-bit build warning
Compiling the nvme driver on 32-bit warns about a cast from a __u64
variable to a pointer:
drivers/block/nvme-core.c: In function 'nvme_submit_io':
drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(void __user *)io.addr, length, NULL, 0);
The cast here is intentional and safe, so we can shut up the
gcc warning by adding an intermediate cast to 'uintptr_t'.
I had previously submitted a patch to fix this problem in the
nvme driver, but it was accepted on the same day that two new
warnings got added.
For clarification, I also change the third instance of this cast
to use uintptr_t instead of unsigned long now.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: d29ec8241c10e ("nvme: submit internal commands through the block layer")
---
v2: use uintptr_t for intermediate cast
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index e917cf304ad0..e8ff16c63977 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1804,7 +1804,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
length = (io.nblocks + 1) << ns->lba_shift;
meta_len = (io.nblocks + 1) * ns->ms;
- metadata = (void __user *)(unsigned long)io.metadata;
+ metadata = (void __user *)(uintptr_t)io.metadata;
write = io.opcode & 1;
if (ns->ext) {
@@ -1844,7 +1844,7 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
c.rw.metadata = cpu_to_le64(meta_dma);
status = __nvme_submit_sync_cmd(ns->queue, &c, NULL,
- (void __user *)io.addr, length, NULL, 0);
+ (void __user *)(uintptr_t)io.addr, length, NULL, 0);
unmap:
if (meta) {
if (status == NVME_SC_SUCCESS && !write) {
@@ -1886,7 +1886,7 @@ static int nvme_user_cmd(struct nvme_dev *dev, struct nvme_ns *ns,
timeout = msecs_to_jiffies(cmd.timeout_ms);
status = __nvme_submit_sync_cmd(ns ? ns->queue : dev->admin_q, &c,
- NULL, (void __user *)cmd.addr, cmd.data_len,
+ NULL, (void __user *)(uintptr_t)cmd.addr, cmd.data_len,
&cmd.result, timeout);
if (status >= 0) {
if (put_user(cmd.result, &ucmd->result))
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH v2] nvme: fix 32-bit build warning
2015-10-09 18:58 ` Arnd Bergmann
(?)
@ 2015-10-12 19:03 ` Christoph Hellwig
-1 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2015-10-12 19:03 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Matthew Wilcox, Jens Axboe, linux-arm-kernel, linux-kernel,
linux-nvme, Christoph Hellwig
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
Note that we're moved the nvme driver to a new directory in the
block tree, but I can rebase it for you if you want.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v2] nvme: fix 32-bit build warning
@ 2015-10-12 19:03 ` Christoph Hellwig
0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2015-10-12 19:03 UTC (permalink / raw)
Looks good,
Reviewed-by: Christoph Hellwig <hch at lst.de>
Note that we're moved the nvme driver to a new directory in the
block tree, but I can rebase it for you if you want.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v2] nvme: fix 32-bit build warning
@ 2015-10-12 19:03 ` Christoph Hellwig
0 siblings, 0 replies; 24+ messages in thread
From: Christoph Hellwig @ 2015-10-12 19:03 UTC (permalink / raw)
To: linux-arm-kernel
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
Note that we're moved the nvme driver to a new directory in the
block tree, but I can rebase it for you if you want.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2] nvme: fix 32-bit build warning
2015-10-12 19:03 ` Christoph Hellwig
(?)
@ 2015-10-12 19:10 ` Jens Axboe
-1 siblings, 0 replies; 24+ messages in thread
From: Jens Axboe @ 2015-10-12 19:10 UTC (permalink / raw)
To: Christoph Hellwig, Arnd Bergmann
Cc: Matthew Wilcox, linux-arm-kernel, linux-kernel, linux-nvme
On 10/12/2015 01:03 PM, Christoph Hellwig wrote:
> Looks good,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Note that we're moved the nvme driver to a new directory in the
> block tree, but I can rebase it for you if you want.
I man handled it on both branches, so we should be good.
--
Jens Axboe
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v2] nvme: fix 32-bit build warning
@ 2015-10-12 19:10 ` Jens Axboe
0 siblings, 0 replies; 24+ messages in thread
From: Jens Axboe @ 2015-10-12 19:10 UTC (permalink / raw)
On 10/12/2015 01:03 PM, Christoph Hellwig wrote:
> Looks good,
>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
>
> Note that we're moved the nvme driver to a new directory in the
> block tree, but I can rebase it for you if you want.
I man handled it on both branches, so we should be good.
--
Jens Axboe
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v2] nvme: fix 32-bit build warning
@ 2015-10-12 19:10 ` Jens Axboe
0 siblings, 0 replies; 24+ messages in thread
From: Jens Axboe @ 2015-10-12 19:10 UTC (permalink / raw)
To: linux-arm-kernel
On 10/12/2015 01:03 PM, Christoph Hellwig wrote:
> Looks good,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Note that we're moved the nvme driver to a new directory in the
> block tree, but I can rebase it for you if you want.
I man handled it on both branches, so we should be good.
--
Jens Axboe
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2] nvme: fix 32-bit build warning
2015-10-12 19:10 ` Jens Axboe
(?)
@ 2015-10-12 19:14 ` Arnd Bergmann
-1 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-10-12 19:14 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Jens Axboe, Christoph Hellwig, Matthew Wilcox, linux-nvme, linux-kernel
On Monday 12 October 2015 13:10:17 Jens Axboe wrote:
> On 10/12/2015 01:03 PM, Christoph Hellwig wrote:
> > Looks good,
> >
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
> >
> > Note that we're moved the nvme driver to a new directory in the
> > block tree, but I can rebase it for you if you want.
>
> I man handled it on both branches, so we should be good.
Thanks! I already saw the move, and it caused another build error
when CONFIG_BLOCK is disabled. Do you have this one?
Arnd
diff --git a/drivers/nvme/host/Kconfig b/drivers/nvme/host/Kconfig
index 0089f78b4071..002a94abdbc4 100644
--- a/drivers/nvme/host/Kconfig
+++ b/drivers/nvme/host/Kconfig
@@ -1,6 +1,6 @@
config BLK_DEV_NVME
tristate "NVM Express block device"
- depends on PCI
+ depends on PCI && BLOCK
---help---
The NVM Express driver is for solid state drives directly
connected to the PCI or PCI Express bus. If you know you
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2] nvme: fix 32-bit build warning
@ 2015-10-12 19:14 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-10-12 19:14 UTC (permalink / raw)
On Monday 12 October 2015 13:10:17 Jens Axboe wrote:
> On 10/12/2015 01:03 PM, Christoph Hellwig wrote:
> > Looks good,
> >
> > Reviewed-by: Christoph Hellwig <hch at lst.de>
> >
> > Note that we're moved the nvme driver to a new directory in the
> > block tree, but I can rebase it for you if you want.
>
> I man handled it on both branches, so we should be good.
Thanks! I already saw the move, and it caused another build error
when CONFIG_BLOCK is disabled. Do you have this one?
Arnd
diff --git a/drivers/nvme/host/Kconfig b/drivers/nvme/host/Kconfig
index 0089f78b4071..002a94abdbc4 100644
--- a/drivers/nvme/host/Kconfig
+++ b/drivers/nvme/host/Kconfig
@@ -1,6 +1,6 @@
config BLK_DEV_NVME
tristate "NVM Express block device"
- depends on PCI
+ depends on PCI && BLOCK
---help---
The NVM Express driver is for solid state drives directly
connected to the PCI or PCI Express bus. If you know you
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2] nvme: fix 32-bit build warning
@ 2015-10-12 19:14 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2015-10-12 19:14 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 12 October 2015 13:10:17 Jens Axboe wrote:
> On 10/12/2015 01:03 PM, Christoph Hellwig wrote:
> > Looks good,
> >
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
> >
> > Note that we're moved the nvme driver to a new directory in the
> > block tree, but I can rebase it for you if you want.
>
> I man handled it on both branches, so we should be good.
Thanks! I already saw the move, and it caused another build error
when CONFIG_BLOCK is disabled. Do you have this one?
Arnd
diff --git a/drivers/nvme/host/Kconfig b/drivers/nvme/host/Kconfig
index 0089f78b4071..002a94abdbc4 100644
--- a/drivers/nvme/host/Kconfig
+++ b/drivers/nvme/host/Kconfig
@@ -1,6 +1,6 @@
config BLK_DEV_NVME
tristate "NVM Express block device"
- depends on PCI
+ depends on PCI && BLOCK
---help---
The NVM Express driver is for solid state drives directly
connected to the PCI or PCI Express bus. If you know you
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH v2] nvme: fix 32-bit build warning
2015-10-12 19:14 ` Arnd Bergmann
(?)
@ 2015-10-12 19:22 ` Jens Axboe
-1 siblings, 0 replies; 24+ messages in thread
From: Jens Axboe @ 2015-10-12 19:22 UTC (permalink / raw)
To: Arnd Bergmann, linux-arm-kernel
Cc: Christoph Hellwig, Matthew Wilcox, linux-nvme, linux-kernel
On 10/12/2015 01:14 PM, Arnd Bergmann wrote:
> On Monday 12 October 2015 13:10:17 Jens Axboe wrote:
>> On 10/12/2015 01:03 PM, Christoph Hellwig wrote:
>>> Looks good,
>>>
>>> Reviewed-by: Christoph Hellwig <hch@lst.de>
>>>
>>> Note that we're moved the nvme driver to a new directory in the
>>> block tree, but I can rebase it for you if you want.
>>
>> I man handled it on both branches, so we should be good.
>
> Thanks! I already saw the move, and it caused another build error
> when CONFIG_BLOCK is disabled. Do you have this one?
I do, Keith sent that one in earlier today, it's in the 4.4 branch.
--
Jens Axboe
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v2] nvme: fix 32-bit build warning
@ 2015-10-12 19:22 ` Jens Axboe
0 siblings, 0 replies; 24+ messages in thread
From: Jens Axboe @ 2015-10-12 19:22 UTC (permalink / raw)
On 10/12/2015 01:14 PM, Arnd Bergmann wrote:
> On Monday 12 October 2015 13:10:17 Jens Axboe wrote:
>> On 10/12/2015 01:03 PM, Christoph Hellwig wrote:
>>> Looks good,
>>>
>>> Reviewed-by: Christoph Hellwig <hch at lst.de>
>>>
>>> Note that we're moved the nvme driver to a new directory in the
>>> block tree, but I can rebase it for you if you want.
>>
>> I man handled it on both branches, so we should be good.
>
> Thanks! I already saw the move, and it caused another build error
> when CONFIG_BLOCK is disabled. Do you have this one?
I do, Keith sent that one in earlier today, it's in the 4.4 branch.
--
Jens Axboe
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v2] nvme: fix 32-bit build warning
@ 2015-10-12 19:22 ` Jens Axboe
0 siblings, 0 replies; 24+ messages in thread
From: Jens Axboe @ 2015-10-12 19:22 UTC (permalink / raw)
To: linux-arm-kernel
On 10/12/2015 01:14 PM, Arnd Bergmann wrote:
> On Monday 12 October 2015 13:10:17 Jens Axboe wrote:
>> On 10/12/2015 01:03 PM, Christoph Hellwig wrote:
>>> Looks good,
>>>
>>> Reviewed-by: Christoph Hellwig <hch@lst.de>
>>>
>>> Note that we're moved the nvme driver to a new directory in the
>>> block tree, but I can rebase it for you if you want.
>>
>> I man handled it on both branches, so we should be good.
>
> Thanks! I already saw the move, and it caused another build error
> when CONFIG_BLOCK is disabled. Do you have this one?
I do, Keith sent that one in earlier today, it's in the 4.4 branch.
--
Jens Axboe
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2015-10-12 19:23 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-06 20:37 [PATCH] nvme: fix 32-bit build warning Arnd Bergmann
2015-10-06 20:37 ` Arnd Bergmann
2015-10-06 20:37 ` Arnd Bergmann
2015-10-09 14:42 ` Christoph Hellwig
2015-10-09 14:42 ` Christoph Hellwig
2015-10-09 14:42 ` Christoph Hellwig
2015-10-09 18:55 ` Arnd Bergmann
2015-10-09 18:55 ` Arnd Bergmann
2015-10-09 18:55 ` Arnd Bergmann
2015-10-09 18:58 ` [PATCH v2] " Arnd Bergmann
2015-10-09 18:58 ` Arnd Bergmann
2015-10-09 18:58 ` Arnd Bergmann
2015-10-12 19:03 ` Christoph Hellwig
2015-10-12 19:03 ` Christoph Hellwig
2015-10-12 19:03 ` Christoph Hellwig
2015-10-12 19:10 ` Jens Axboe
2015-10-12 19:10 ` Jens Axboe
2015-10-12 19:10 ` Jens Axboe
2015-10-12 19:14 ` Arnd Bergmann
2015-10-12 19:14 ` Arnd Bergmann
2015-10-12 19:14 ` Arnd Bergmann
2015-10-12 19:22 ` Jens Axboe
2015-10-12 19:22 ` Jens Axboe
2015-10-12 19:22 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.