Skip to contentSkip to conversation

virtio_rng: adopt driver to newest virtio code

PATCH Applied Christian Borntraeger 2 participants 2 messages Jan 14, 2008 – Jan 15, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio_rng: adopt driver to newest virtio code

Rusty,

This patch changes the virtio_rng to a callback without a return value.

---
 drivers/char/hw_random/virtio-rng.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/char/hw_random/virtio-rng.c +2 -3
Index: kvm/drivers/char/hw_random/virtio-rng.c
===================================================================
@@ -27,13 +27,12 @@ static struct virtqueue *vq;
 static u32 random_data;
 static bool have_data;
 
-static bool random_recv_done(struct virtqueue *vq)
+static void random_recv_done(struct virtqueue *vq)
 {
 	have_data = true;
 
-	/* Don't suppress callbacks: there can't be any more since we
+	/* No need to call disable_cb: there can't be any more since we
 	 * have used up the only buffer. */
-	return true;
 }
 
 static void register_buffer(void)
#1 lore raw
Quoted 5 lines · On Tuesday 15 January 2008 02:51:47 Christian Borntraeger wrote:

Rusty,

This patch changes the virtio_rng to a callback without a return value.

Thanks, applied.

BTW, virtio-rng was pretty much untested, so no huge surprise it has bugs.

Rusty.