virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: rusty@rustcorp.com.au, mst@redhat.com,
	virtio-dev@lists.oasis-open.org,
	virtualization@lists.linux-foundation.org
Subject: [PATCH 1/3] tools/virtio: update internal copies of headers
Date: Tue, 11 Feb 2014 16:58:18 +1030	[thread overview]
Message-ID: <1392100100-28193-2-git-send-email-joel@jms.id.au> (raw)
In-Reply-To: <1392100100-28193-1-git-send-email-joel@jms.id.au>

The virtio headers have changed recently:

 5b1bf7cb673 virtio_ring: let virtqueue_{kick()/notify()} return a bool
 46f9c2b925a virtio_ring: change host notification API

Update the internal copies to fix the build of virtio_test:

  cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
    -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE
    -c -o virtio_test.o virtio_test.c
  In file included from virtio_test.c:15:0:
  ./linux/virtio.h:76:19: error: conflicting types for ‘vring_new_virtqueue’
   struct virtqueue *vring_new_virtqueue(unsigned int index,
                     ^
  In file included from ./linux/virtio_ring.h:1:0,
                   from ../../usr/include/linux/vhost.h:17,
                   from virtio_test.c:14:
  ./linux/../../../include/linux/virtio_ring.h:68:19: note: previous
  declaration of ‘vring_new_virtqueue’ was here
   struct virtqueue *vring_new_virtqueue(unsigned int index,
  virtio_test.c: In function ‘vq_info_add’:
  virtio_test.c:103:12: warning: passing argument 7 of ‘vring_new_virtqueue’
  from incompatible pointer type [enabled by default]
              vq_notify, vq_callback, "test");
              ^
  In file included from virtio_test.c:15:0:
  ./linux/virtio.h:76:19: note: expected ‘void (*)(struct virtqueue *)’ but
  argument is of type ‘_Bool (*)(struct virtqueue *)’
   struct virtqueue *vring_new_virtqueue(unsigned int index,
                     ^

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 tools/virtio/linux/virtio.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/virtio/linux/virtio.h b/tools/virtio/linux/virtio.h
index 8447830..5a2d1f0 100644
--- a/tools/virtio/linux/virtio.h
+++ b/tools/virtio/linux/virtio.h
@@ -63,7 +63,7 @@ int virtqueue_add_inbuf(struct virtqueue *vq,
 			void *data,
 			gfp_t gfp);
 
-void virtqueue_kick(struct virtqueue *vq);
+bool virtqueue_kick(struct virtqueue *vq);
 
 void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len);
 
@@ -79,7 +79,7 @@ struct virtqueue *vring_new_virtqueue(unsigned int index,
 				      struct virtio_device *vdev,
 				      bool weak_barriers,
 				      void *pages,
-				      void (*notify)(struct virtqueue *vq),
+				      bool (*notify)(struct virtqueue *vq),
 				      void (*callback)(struct virtqueue *vq),
 				      const char *name);
 void vring_del_virtqueue(struct virtqueue *vq);
-- 
1.9.rc1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2014-02-11  6:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11  6:28 [PATCH 0/3] tools/virtio: build fixes for virtio_test Joel Stanley
2014-02-11  6:28 ` Joel Stanley [this message]
2014-02-11  6:28 ` [PATCH 2/3] tools/virtio: fix missing kmemleak_ignore symbol Joel Stanley
2014-02-11  6:28 ` [PATCH 3/3] tools/virtio: add a missing ) Joel Stanley
2014-02-11  6:57 ` [PATCH 0/3] tools/virtio: build fixes for virtio_test Michael S. Tsirkin
2014-02-13  4:28   ` Rusty Russell
2014-02-13  4:40   ` Rusty Russell
2014-02-13 11:05     ` Heinz Graalfs

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=1392100100-28193-2-git-send-email-joel@jms.id.au \
    --to=joel@jms.id.au \
    --cc=mst@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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).