diff mbox

dataplane: fix shadowed return value

Message ID 1389610059-27806-1-git-send-email-stefanha@redhat.com
State New
Headers show

Commit Message

Stefan Hajnoczi Jan. 13, 2014, 10:47 a.m. UTC
Propagate the error return value from get_indirect().

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/virtio/dataplane/vring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Markus Armbruster Jan. 14, 2014, 8:34 a.m. UTC | #1
Stefan Hajnoczi <stefanha@redhat.com> writes:

> Propagate the error return value from get_indirect().
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  hw/virtio/dataplane/vring.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/virtio/dataplane/vring.c b/hw/virtio/dataplane/vring.c
> index 250d45e..665a1ff 100644
> --- a/hw/virtio/dataplane/vring.c
> +++ b/hw/virtio/dataplane/vring.c
> @@ -376,7 +376,7 @@ int vring_pop(VirtIODevice *vdev, Vring *vring,
>          barrier();
>  
>          if (desc.flags & VRING_DESC_F_INDIRECT) {
> -            int ret = get_indirect(vring, elem, &desc);
> +            ret = get_indirect(vring, elem, &desc);
>              if (ret < 0) {
>                  goto out;
>              }

Broken in commit 4d684832.  Could be mentioned in commit message.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Peter Maydell Jan. 14, 2014, 12:58 p.m. UTC | #2
On 13 January 2014 10:47, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> Propagate the error return value from get_indirect().
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

This fixes the compilation error (see also bug 1268596).

thanks
-- PMM
Stefan Hajnoczi Jan. 15, 2014, 3:46 a.m. UTC | #3
On Mon, Jan 13, 2014 at 06:47:39PM +0800, Stefan Hajnoczi wrote:
> Propagate the error return value from get_indirect().
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  hw/virtio/dataplane/vring.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Fixed commit description as suggested by Markus.

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan
Peter Maydell Jan. 23, 2014, 2:38 p.m. UTC | #4
On 15 January 2014 03:46, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Mon, Jan 13, 2014 at 06:47:39PM +0800, Stefan Hajnoczi wrote:
>> Propagate the error return value from get_indirect().
>>
>> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
>> ---
>>  hw/virtio/dataplane/vring.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Fixed commit description as suggested by Markus.
>
> Thanks, applied to my block tree:
> https://github.com/stefanha/qemu/commits/block

Ping! Can we get this into master, please? It's now
been failing to compile for over a week...

thanks
-- PMM
Kevin Wolf Jan. 23, 2014, 2:58 p.m. UTC | #5
Am 23.01.2014 um 15:38 hat Peter Maydell geschrieben:
> On 15 January 2014 03:46, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> > On Mon, Jan 13, 2014 at 06:47:39PM +0800, Stefan Hajnoczi wrote:
> >> Propagate the error return value from get_indirect().
> >>
> >> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> >> ---
> >>  hw/virtio/dataplane/vring.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Fixed commit description as suggested by Markus.
> >
> > Thanks, applied to my block tree:
> > https://github.com/stefanha/qemu/commits/block
> 
> Ping! Can we get this into master, please? It's now
> been failing to compile for over a week...

Nobody seems to be processing pull requests at the moment...

This is queued for the next block layer pull request, but even the one
from two weeks ago hasn't been pulled yet. If the last one doesn't get
pulled until tomorrow, I'll send a v2 of the pull request that includes
the changes from what was planned to be three separate one-week pull
requests.

Kevin
diff mbox

Patch

diff --git a/hw/virtio/dataplane/vring.c b/hw/virtio/dataplane/vring.c
index 250d45e..665a1ff 100644
--- a/hw/virtio/dataplane/vring.c
+++ b/hw/virtio/dataplane/vring.c
@@ -376,7 +376,7 @@  int vring_pop(VirtIODevice *vdev, Vring *vring,
         barrier();
 
         if (desc.flags & VRING_DESC_F_INDIRECT) {
-            int ret = get_indirect(vring, elem, &desc);
+            ret = get_indirect(vring, elem, &desc);
             if (ret < 0) {
                 goto out;
             }