Re: [Qemu-devel] [PATCH 2/4] vring: factor common code for error exits

2013-10-11 Thread Paolo Bonzini
Il 10/10/2013 22:53, Richard Henderson ha scritto: > On 10/10/2013 08:07 AM, Paolo Bonzini wrote: >> return head; >> + >> +out: >> +assert(ret < 0); >> +if (ret == -EFAULT) { >> +vring->broken = true; >> +} >> +return ret; > > If this is only the error path, can we cal

Re: [Qemu-devel] [PATCH 2/4] vring: factor common code for error exits

2013-10-10 Thread Richard Henderson
On 10/10/2013 08:07 AM, Paolo Bonzini wrote: > return head; > + > +out: > +assert(ret < 0); > +if (ret == -EFAULT) { > +vring->broken = true; > +} > +return ret; If this is only the error path, can we call the label something other than "out"? r~

[Qemu-devel] [PATCH 2/4] vring: factor common code for error exits

2013-10-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/block/dataplane/virtio-blk.c | 1 + hw/virtio/dataplane/vring.c | 34 +- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index f2d7350..319a2