Skip to contentSkip to conversation

dataplane: fix shadowed return value

PATCH Applied Stefan Hajnoczi 5 participants 6 messages Jan 14, 2014 – Jan 23, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dataplane: fix shadowed return value

Propagate the error return value from get_indirect().

---
 hw/virtio/dataplane/vring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/virtio/dataplane/vring.c +1 -1
index 250d45e..665a1ff 100644
@@ -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;
             }
Signature · 1 line
1.8.4.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Stefan Hajnoczi

Propagate the error return value from get_indirect().

---
 hw/virtio/dataplane/vring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/virtio/dataplane/vring.c +0 -0
index 250d45e..665a1ff 100644

hw/virtio/dataplane/vring.c int vring_pop(VirtIODevice *vdev, Vring *vring, · line 382

Quoted 8 lines
hw/virtio/dataplane/vring.c +1 -1
@@ -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.

#4 lore raw
Quoted 8 lines · Stefan Hajnoczi
Quoted 6 lines · Stefan Hajnoczi

Propagate the error return value from get_indirect().

---
 hw/virtio/dataplane/vring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines

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

#5 lore raw

Am 23.01.2014 um 15:38 hat Peter Maydell geschrieben:

Quoted 9 lines · Stefan Hajnoczi
Quoted 8 lines · Stefan Hajnoczi
Quoted 6 lines

Propagate the error return value from get_indirect().

---
 hw/virtio/dataplane/vring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 7 lines
Quoted 4 lines

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