diff options
author | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2019-07-23 17:25:59 +0200 |
---|---|---|
committer | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2019-10-02 00:39:50 +0200 |
commit | 0d5509902d9fad2a415d42ce556b2bccb5ade9e2 (patch) | |
tree | 8dc946ca84bf6f5bd60666c1364cd77813571933 | |
parent | 1a10b1c39bc4179bdad345bec9fe79e97c08f31d (diff) |
vhost: Fix compilation issue.
This patch addresses a compilation issues with vhost.c.
drivers/vhost/vhost.c: In function 'vhost_copy_to_user':
drivers/vhost/vhost.c:743:22: warning: passing argument 1 of 'copy_to_iter' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
error, forbidden warning:vhost.c:743
ret = copy_to_iter(from, size, &t);
^~~~
In file included from include/linux/vringh.h:28:0,
from include/linux/virtio.h:11,
from include/linux/virtio_config.h:6,
from ./include/uapi/linux/vhost.h:16,
from drivers/vhost/vhost.c:15:
include/linux/uio.h:85:8: note: expected 'void *' but argument is of type 'const void *'
size_t copy_to_iter(void *addr, size_t bytes, struct iov_iter *i);
^~~~~~~~~~~~
scripts/Makefile.build:277: recipe for target 'drivers/vhost/vhost.o' failed
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
-rw-r--r-- | drivers/vhost/vhost.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 53b1b3cfce84..80d62cefa284 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -720,7 +720,7 @@ static int translate_desc(struct vhost_virtqueue *vq, u64 addr, u32 len, struct iovec iov[], int iov_size, int access); static int vhost_copy_to_user(struct vhost_virtqueue *vq, void *to, - const void *from, unsigned size) + void *from, unsigned size) { int ret; |