From: Stephen Rothwell <sfr@canb.auug.org.au>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Linux Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: linux-next: build failure after merge of the vhost tree
Date: Thu, 30 Jul 2020 17:52:33 +1000 [thread overview]
Message-ID: <20200730175233.3351a8fc@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 3742 bytes --]
Hi all,
After merging the vhost tree, today's linux-next build (x86_64
allmodconfig) failed like this:
drivers/virtio/virtio_vdpa.c: In function 'virtio_vdpa_get':
drivers/virtio/virtio_vdpa.c:60:32: warning: unused variable 'ops' [-Wunused-variable]
60 | const struct vdpa_config_ops *ops = vdpa->config;
| ^~~
drivers/virtio/virtio_vdpa.c: In function 'virtio_vdpa_finalize_features':
drivers/virtio/virtio_vdpa.c:301:9: error: void value not ignored as it ought to be
301 | return vdpa_set_features(vdpa, vdev->features);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/virtio/virtio_vdpa.c:296:32: warning: unused variable 'ops' [-Wunused-variable]
296 | const struct vdpa_config_ops *ops = vdpa->config;
| ^~~
drivers/virtio/virtio_vdpa.c:302:1: warning: control reaches end of non-void function [-Wreturn-type]
302 | }
| ^
drivers/vhost/vdpa.c: In function 'vhost_vdpa_get_config':
drivers/vhost/vdpa.c:198:32: warning: unused variable 'ops' [-Wunused-variable]
198 | const struct vdpa_config_ops *ops = vdpa->config;
| ^~~
drivers/vhost/vdpa.c: In function 'vhost_vdpa_set_features':
drivers/vhost/vdpa.c:284:6: error: void value not ignored as it ought to be
284 | if (vdpa_set_features(vdpa, features))
| ^~~~~~~~~~~~~~~~~
Caused by commit
d4ff0377f05b ("virtio_vdpa: legacy features handling")
I added the following (hack) patch for today.
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 30 Jul 2020 17:39:11 +1000
Subject: [PATCH] virtio_vdpa: fix legacy features handling
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/vhost/vdpa.c | 4 +---
drivers/virtio/virtio_vdpa.c | 5 ++---
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index be9b3ed01a93..f7ef5f3ef0e3 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -195,7 +195,6 @@ static long vhost_vdpa_get_config(struct vhost_vdpa *v,
struct vhost_vdpa_config __user *c)
{
struct vdpa_device *vdpa = v->vdpa;
- const struct vdpa_config_ops *ops = vdpa->config;
struct vhost_vdpa_config config;
unsigned long size = offsetof(struct vhost_vdpa_config, buf);
u8 *buf;
@@ -281,8 +280,7 @@ static long vhost_vdpa_set_features(struct vhost_vdpa *v, u64 __user *featurep)
if (features & ~vhost_vdpa_features[v->virtio_id])
return -EINVAL;
- if (vdpa_set_features(vdpa, features))
- return -EINVAL;
+ vdpa_set_features(vdpa, features);
return 0;
}
diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c
index d0ae58d35392..73c5d49ff0df 100644
--- a/drivers/virtio/virtio_vdpa.c
+++ b/drivers/virtio/virtio_vdpa.c
@@ -57,7 +57,6 @@ static void virtio_vdpa_get(struct virtio_device *vdev, unsigned offset,
void *buf, unsigned len)
{
struct vdpa_device *vdpa = vd_get_vdpa(vdev);
- const struct vdpa_config_ops *ops = vdpa->config;
vdpa_get_config(vdpa, offset, buf, len);
}
@@ -293,12 +292,12 @@ static u64 virtio_vdpa_get_features(struct virtio_device *vdev)
static int virtio_vdpa_finalize_features(struct virtio_device *vdev)
{
struct vdpa_device *vdpa = vd_get_vdpa(vdev);
- const struct vdpa_config_ops *ops = vdpa->config;
/* Give virtio_ring a chance to accept features. */
vring_transport_features(vdev);
- return vdpa_set_features(vdpa, vdev->features);
+ vdpa_set_features(vdpa, vdev->features);
+ return 0;
}
static const char *virtio_vdpa_bus_name(struct virtio_device *vdev)
--
2.27.0
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2020-07-30 7:52 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-30 7:52 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-02-29 3:55 linux-next: build failure after merge of the vhost tree Stephen Rothwell
2024-02-29 4:01 ` Xuan Zhuo
2024-02-29 7:21 ` Xuan Zhuo
2022-08-16 1:13 Stephen Rothwell
2022-06-01 1:42 Stephen Rothwell
2022-06-01 21:57 ` Michael S. Tsirkin
2022-06-02 3:19 ` Stephen Rothwell
2021-11-25 1:23 Stephen Rothwell
2021-09-06 2:49 Stephen Rothwell
2021-09-06 2:57 ` Yongji Xie
2021-07-08 1:08 Stephen Rothwell
2021-07-08 5:37 ` Michael S. Tsirkin
2020-08-04 5:11 Stephen Rothwell
2020-08-04 5:47 ` Guennadi Liakhovetski
2020-08-04 7:04 ` Guennadi Liakhovetski
2020-08-04 9:15 ` Michael S. Tsirkin
2020-07-28 8:11 Stephen Rothwell
2020-07-29 14:08 ` Michael S. Tsirkin
2020-05-07 5:36 Stephen Rothwell
2020-04-07 3:05 Stephen Rothwell
2020-04-07 10:01 ` Michael S. Tsirkin
2020-04-07 18:58 ` Nathan Chancellor
2020-04-09 21:15 ` Michael S. Tsirkin
2019-12-04 3:24 Stephen Rothwell
2019-12-07 23:45 ` Stephen Rothwell
2019-12-09 15:24 ` Michael S. Tsirkin
2018-02-07 2:04 Stephen Rothwell
2018-02-07 2:52 ` Michael S. Tsirkin
2018-02-07 2:54 ` Stephen Rothwell
2018-02-07 2:57 ` Michael S. Tsirkin
2018-02-07 4:30 ` Stephen Rothwell
2017-03-30 4:25 Stephen Rothwell
2017-04-03 6:21 ` Stephen Rothwell
2014-06-10 4:12 Stephen Rothwell
2014-06-10 9:38 ` Michael S. Tsirkin
2014-06-03 8:38 Stephen Rothwell
2014-06-09 13:19 ` Michael S. Tsirkin
2013-05-22 4:37 Stephen Rothwell
2013-05-22 5:07 ` Michael S. Tsirkin
2013-05-22 9:03 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200730175233.3351a8fc@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mst@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).