diff mbox

virtio-9p: Fix syntax error in debug code

Message ID 1311143248-29509-1-git-send-email-weil@mail.berlios.de
State Accepted
Headers show

Commit Message

Stefan Weil July 20, 2011, 6:27 a.m. UTC
This error was reported by cppcheck:

qemu/hw/9pfs/virtio-9p-debug.c:342:
error: Invalid number of character ({) when these macros are defined:
'DEBUG_DATA'.

Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 hw/9pfs/virtio-9p-debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Aneesh Kumar K.V July 20, 2011, 9:44 a.m. UTC | #1
On Wed, 20 Jul 2011 08:27:28 +0200, Stefan Weil <weil@mail.berlios.de> wrote:
> This error was reported by cppcheck:
> 
> qemu/hw/9pfs/virtio-9p-debug.c:342:
> error: Invalid number of character ({) when these macros are defined:
> 'DEBUG_DATA'.
> 
> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
>  hw/9pfs/virtio-9p-debug.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/9pfs/virtio-9p-debug.c b/hw/9pfs/virtio-9p-debug.c
> index 4636ad5..96925f0 100644
> --- a/hw/9pfs/virtio-9p-debug.c
> +++ b/hw/9pfs/virtio-9p-debug.c
> @@ -295,7 +295,7 @@ static void pprint_data(V9fsPDU *pdu, int rx, size_t *offsetp, const char *name)
> 
>      if (rx) {
>          count = pdu->elem.in_num;
> -    } else
> +    } else {
>          count = pdu->elem.out_num;
>      }
> 

Applied.

We also need to update virtio-9p-debug w.r.t the new co-routine
series. With co-routine we can have multiple 9p handler started
simultaneously.

-aneesh
Stefan Weil Sept. 8, 2011, 4:17 p.m. UTC | #2
Am 20.07.2011 11:44, schrieb Aneesh Kumar K.V:
> On Wed, 20 Jul 2011 08:27:28 +0200, Stefan Weil <weil@mail.berlios.de> 
> wrote:
>> This error was reported by cppcheck:
>>
>> qemu/hw/9pfs/virtio-9p-debug.c:342:
>> error: Invalid number of character ({) when these macros are defined:
>> 'DEBUG_DATA'.
>>
>> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
>> ---
>> hw/9pfs/virtio-9p-debug.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/hw/9pfs/virtio-9p-debug.c b/hw/9pfs/virtio-9p-debug.c
>> index 4636ad5..96925f0 100644
>> --- a/hw/9pfs/virtio-9p-debug.c
>> +++ b/hw/9pfs/virtio-9p-debug.c
>> @@ -295,7 +295,7 @@ static void pprint_data(V9fsPDU *pdu, int rx, 
>> size_t *offsetp, const char *name)
>>
>> if (rx) {
>> count = pdu->elem.in_num;
>> - } else
>> + } else {
>> count = pdu->elem.out_num;
>> }
>>
>
> Applied.
>
> We also need to update virtio-9p-debug w.r.t the new co-routine
> series. With co-routine we can have multiple 9p handler started
> simultaneously.
>
> -aneesh

Maybe this patch can be applied via qemu-trivial.
I simply would like to get it out of my list of open patches.

Thanks,
Stefan W.
Stefan Hajnoczi Sept. 9, 2011, 8:58 a.m. UTC | #3
On Thu, Sep 08, 2011 at 06:17:08PM +0200, Stefan Weil wrote:
> Am 20.07.2011 11:44, schrieb Aneesh Kumar K.V:
> >On Wed, 20 Jul 2011 08:27:28 +0200, Stefan Weil
> ><weil@mail.berlios.de> wrote:
> >>This error was reported by cppcheck:
> >>
> >>qemu/hw/9pfs/virtio-9p-debug.c:342:
> >>error: Invalid number of character ({) when these macros are defined:
> >>'DEBUG_DATA'.
> >>
> >>Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> >>Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> >>---
> >>hw/9pfs/virtio-9p-debug.c | 2 +-
> >>1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >>diff --git a/hw/9pfs/virtio-9p-debug.c b/hw/9pfs/virtio-9p-debug.c
> >>index 4636ad5..96925f0 100644
> >>--- a/hw/9pfs/virtio-9p-debug.c
> >>+++ b/hw/9pfs/virtio-9p-debug.c
> >>@@ -295,7 +295,7 @@ static void pprint_data(V9fsPDU *pdu, int
> >>rx, size_t *offsetp, const char *name)
> >>
> >>if (rx) {
> >>count = pdu->elem.in_num;
> >>- } else
> >>+ } else {
> >>count = pdu->elem.out_num;
> >>}
> >>
> >
> >Applied.
> >
> >We also need to update virtio-9p-debug w.r.t the new co-routine
> >series. With co-routine we can have multiple 9p handler started
> >simultaneously.
> >
> >-aneesh
> 
> Maybe this patch can be applied via qemu-trivial.
> I simply would like to get it out of my list of open patches.

I checked with Aneesh who agreed to move this patch through the
trivial-patches tree.  This patch has been applied to the trivial
patches -next tree:

http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches-next

Stefan
diff mbox

Patch

diff --git a/hw/9pfs/virtio-9p-debug.c b/hw/9pfs/virtio-9p-debug.c
index 4636ad5..96925f0 100644
--- a/hw/9pfs/virtio-9p-debug.c
+++ b/hw/9pfs/virtio-9p-debug.c
@@ -295,7 +295,7 @@  static void pprint_data(V9fsPDU *pdu, int rx, size_t *offsetp, const char *name)
 
     if (rx) {
         count = pdu->elem.in_num;
-    } else
+    } else {
         count = pdu->elem.out_num;
     }