qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block: changed to proper enum type
@ 2014-10-31  4:52 SeokYeon Hwang
  2014-11-03  8:36 ` Max Reitz
  2014-11-03 16:14 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: SeokYeon Hwang @ 2014-10-31  4:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, stefanha, SeokYeon Hwang

To fix compiler warning on clang > 3.4, changed to proper enum type.

Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
---
 block.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block.c b/block.c
index 88f6d9b..50845a4 100644
--- a/block.c
+++ b/block.c
@@ -3540,10 +3540,10 @@ static void send_qmp_error_event(BlockDriverState *bs,
                                  BlockErrorAction action,
                                  bool is_read, int error)
 {
-    BlockErrorAction ac;
+    IoOperationType operation;
 
-    ac = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
-    qapi_event_send_block_io_error(bdrv_get_device_name(bs), ac, action,
+    operation = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
+    qapi_event_send_block_io_error(bdrv_get_device_name(bs), operation, action,
                                    bdrv_iostatus_is_enabled(bs),
                                    error == ENOSPC, strerror(error),
                                    &error_abort);
-- 
2.1.0

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

* Re: [Qemu-devel] [PATCH] block: changed to proper enum type
  2014-10-31  4:52 [Qemu-devel] [PATCH] block: changed to proper enum type SeokYeon Hwang
@ 2014-11-03  8:36 ` Max Reitz
  2014-11-03 16:14 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Max Reitz @ 2014-11-03  8:36 UTC (permalink / raw)
  To: SeokYeon Hwang, qemu-devel; +Cc: kwolf, stefanha

On 2014-10-31 at 05:52, SeokYeon Hwang wrote:
> To fix compiler warning on clang > 3.4, changed to proper enum type.
>
> Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
> ---
>   block.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/block.c b/block.c
> index 88f6d9b..50845a4 100644
> --- a/block.c
> +++ b/block.c
> @@ -3540,10 +3540,10 @@ static void send_qmp_error_event(BlockDriverState *bs,
>                                    BlockErrorAction action,
>                                    bool is_read, int error)
>   {
> -    BlockErrorAction ac;
> +    IoOperationType operation;
>   
> -    ac = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
> -    qapi_event_send_block_io_error(bdrv_get_device_name(bs), ac, action,
> +    operation = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
> +    qapi_event_send_block_io_error(bdrv_get_device_name(bs), operation, action,
>                                      bdrv_iostatus_is_enabled(bs),
>                                      error == ENOSPC, strerror(error),
>                                      &error_abort);

Hi,

thank you for this patch, but the reason I did not review it is because 
there were already a couple of these on the mailing list, and Stefan 
already merged one of them to his block tree; see: 
http://lists.nongnu.org/archive/cgi-bin/namazu.cgi?query=BlockErrorAction+IoOperationType&submit=Search!&idxname=qemu-devel&max=20&result=normal&sort=score

The patch Stefan merged is here: 
https://github.com/stefanha/qemu/commit/eaedb4cb2706a0ad4698d556aa2a8b091962d545

Max

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

* Re: [Qemu-devel] [PATCH] block: changed to proper enum type
  2014-10-31  4:52 [Qemu-devel] [PATCH] block: changed to proper enum type SeokYeon Hwang
  2014-11-03  8:36 ` Max Reitz
@ 2014-11-03 16:14 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2014-11-03 16:14 UTC (permalink / raw)
  To: SeokYeon Hwang, qemu-devel; +Cc: kwolf, stefanha

On 31/10/2014 05:52, SeokYeon Hwang wrote:
> To fix compiler warning on clang > 3.4, changed to proper enum type.
> 
> Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
> ---
>  block.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/block.c b/block.c
> index 88f6d9b..50845a4 100644
> --- a/block.c
> +++ b/block.c
> @@ -3540,10 +3540,10 @@ static void send_qmp_error_event(BlockDriverState *bs,
>                                   BlockErrorAction action,
>                                   bool is_read, int error)
>  {
> -    BlockErrorAction ac;
> +    IoOperationType operation;
>  
> -    ac = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
> -    qapi_event_send_block_io_error(bdrv_get_device_name(bs), ac, action,
> +    operation = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
> +    qapi_event_send_block_io_error(bdrv_get_device_name(bs), operation, action,
>                                     bdrv_iostatus_is_enabled(bs),
>                                     error == ENOSPC, strerror(error),
>                                     &error_abort);
> 

Hi, I think a similar patch has already been posted.

Paolo

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

end of thread, other threads:[~2014-11-03 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-31  4:52 [Qemu-devel] [PATCH] block: changed to proper enum type SeokYeon Hwang
2014-11-03  8:36 ` Max Reitz
2014-11-03 16:14 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).