All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 1/1] block: fix shadowed variable in bdrv_co_pdiscard
@ 2017-07-10 15:05 Denis V. Lunev
  2017-07-10 15:32 ` Eric Blake
  2017-07-11  9:23 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Denis V. Lunev @ 2017-07-10 15:05 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Denis V. Lunev, Stefan Hajnoczi, Kevin Wolf, Eric Blake

We've had a shadowed 'ret' variable, which risks returning the wrong
value, introduced in commit b9c64947.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Fam Zheng <famz@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Eric Blake <eblake@redhat.com>
---
 block/io.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/block/io.c b/block/io.c
index 23170a57ee..87208990c4 100644
--- a/block/io.c
+++ b/block/io.c
@@ -2327,7 +2327,6 @@ int coroutine_fn bdrv_co_pdiscard(BlockDriverState *bs, int64_t offset,
     assert(max_pdiscard >= bs->bl.request_alignment);
 
     while (bytes > 0) {
-        int ret;
         int num = bytes;
 
         if (head) {
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2 1/1] block: fix shadowed variable in bdrv_co_pdiscard
  2017-07-10 15:05 [Qemu-devel] [PATCH v2 1/1] block: fix shadowed variable in bdrv_co_pdiscard Denis V. Lunev
@ 2017-07-10 15:32 ` Eric Blake
  2017-07-11  9:23 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2017-07-10 15:32 UTC (permalink / raw)
  To: Denis V. Lunev, qemu-devel; +Cc: qemu-block, Stefan Hajnoczi, Kevin Wolf

[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]

On 07/10/2017 10:05 AM, Denis V. Lunev wrote:
> We've had a shadowed 'ret' variable, which risks returning the wrong
> value, introduced in commit b9c64947.
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> Reviewed-by: Fam Zheng <famz@redhat.com>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> CC: Kevin Wolf <kwolf@redhat.com>
> CC: Eric Blake <eblake@redhat.com>
> ---
>  block/io.c | 1 -
>  1 file changed, 1 deletion(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

> diff --git a/block/io.c b/block/io.c
> index 23170a57ee..87208990c4 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -2327,7 +2327,6 @@ int coroutine_fn bdrv_co_pdiscard(BlockDriverState *bs, int64_t offset,
>      assert(max_pdiscard >= bs->bl.request_alignment);
>  
>      while (bytes > 0) {
> -        int ret;
>          int num = bytes;
>  
>          if (head) {
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/1] block: fix shadowed variable in bdrv_co_pdiscard
  2017-07-10 15:05 [Qemu-devel] [PATCH v2 1/1] block: fix shadowed variable in bdrv_co_pdiscard Denis V. Lunev
  2017-07-10 15:32 ` Eric Blake
@ 2017-07-11  9:23 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2017-07-11  9:23 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: qemu-devel, Kevin Wolf, Stefan Hajnoczi, qemu-block

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

On Mon, Jul 10, 2017 at 06:05:59PM +0300, Denis V. Lunev wrote:
> We've had a shadowed 'ret' variable, which risks returning the wrong
> value, introduced in commit b9c64947.
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> Reviewed-by: Fam Zheng <famz@redhat.com>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> CC: Kevin Wolf <kwolf@redhat.com>
> CC: Eric Blake <eblake@redhat.com>
> ---
>  block/io.c | 1 -
>  1 file changed, 1 deletion(-)

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

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-11  9:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10 15:05 [Qemu-devel] [PATCH v2 1/1] block: fix shadowed variable in bdrv_co_pdiscard Denis V. Lunev
2017-07-10 15:32 ` Eric Blake
2017-07-11  9:23 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.