All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: arei.gonglei@huawei.com, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 3/3] vhost-user: remove superfluous '\n' around error_report()
Date: Tue, 28 Apr 2015 14:08:42 +0200	[thread overview]
Message-ID: <553F784A.4040004@suse.de> (raw)
In-Reply-To: <1430212264-9672-4-git-send-email-arei.gonglei@huawei.com>

Am 28.04.2015 um 11:11 schrieb arei.gonglei@huawei.com:
> From: Gonglei <arei.gonglei@huawei.com>
> 
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
>  hw/virtio/vhost-user.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index aefe0bb..e7ab829 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -128,7 +128,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
>  
>      r = qemu_chr_fe_read_all(chr, p, size);
>      if (r != size) {
> -        error_report("Failed to read msg header. Read %d instead of %d.\n", r,
> +        error_report("Failed to read msg header. Read %d instead of %d.", r,
>                  size);
>          goto fail;
>      }
> @@ -136,7 +136,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
>      /* validate received flags */
>      if (msg->flags != (VHOST_USER_REPLY_MASK | VHOST_USER_VERSION)) {
>          error_report("Failed to read msg header."
> -                " Flags 0x%x instead of 0x%x.\n", msg->flags,
> +                " Flags 0x%x instead of 0x%x.", msg->flags,
>                  VHOST_USER_REPLY_MASK | VHOST_USER_VERSION);
>          goto fail;
>      }
> @@ -144,7 +144,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
>      /* validate message size is sane */
>      if (msg->size > VHOST_USER_PAYLOAD_SIZE) {
>          error_report("Failed to read msg header."
> -                " Size %d exceeds the maximum %zu.\n", msg->size,
> +                " Size %d exceeds the maximum %zu.", msg->size,
>                  VHOST_USER_PAYLOAD_SIZE);
>          goto fail;
>      }
> @@ -155,7 +155,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
>          r = qemu_chr_fe_read_all(chr, p, size);
>          if (r != size) {
>              error_report("Failed to read msg payload."
> -                         " Read %d instead of %d.\n", r, msg->size);
> +                         " Read %d instead of %d.", r, msg->size);
>              goto fail;
>          }
>      }
> @@ -235,8 +235,8 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,
>          msg.memory.nregions = fd_num;
>  
>          if (!fd_num) {
> -            error_report("Failed initializing vhost-user memory map\n"
> -                    "consider using -object memory-backend-file share=on\n");
> +            error_report("Failed initializing vhost-user memory map, "
> +                    "consider using -object memory-backend-file share=on");

This one is not just dropping a trailing \n, but looks good to me,

Reviewed-by: Andreas Färber <afaerber@suse.de>

Thanks,
Andreas

>              return -1;
>          }
>  
> @@ -280,7 +280,7 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,
>          }
>          break;
>      default:
> -        error_report("vhost-user trying to send unhandled ioctl\n");
> +        error_report("vhost-user trying to send unhandled ioctl");
>          return -1;
>          break;
>      }
> @@ -296,27 +296,27 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,
>  
>          if (msg_request != msg.request) {
>              error_report("Received unexpected msg type."
> -                    " Expected %d received %d\n", msg_request, msg.request);
> +                    " Expected %d received %d", msg_request, msg.request);
>              return -1;
>          }
>  
>          switch (msg_request) {
>          case VHOST_USER_GET_FEATURES:
>              if (msg.size != sizeof(m.u64)) {
> -                error_report("Received bad msg size.\n");
> +                error_report("Received bad msg size.");
>                  return -1;
>              }
>              *((__u64 *) arg) = msg.u64;
>              break;
>          case VHOST_USER_GET_VRING_BASE:
>              if (msg.size != sizeof(m.state)) {
> -                error_report("Received bad msg size.\n");
> +                error_report("Received bad msg size.");
>                  return -1;
>              }
>              memcpy(arg, &msg.state, sizeof(struct vhost_vring_state));
>              break;
>          default:
> -            error_report("Received unexpected msg type.\n");
> +            error_report("Received unexpected msg type.");
>              return -1;
>              break;
>          }
> 


-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)


WARNING: multiple messages have this Message-ID (diff)
From: "Andreas Färber" <afaerber@suse.de>
To: arei.gonglei@huawei.com, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] vhost-user: remove superfluous '\n' around error_report()
Date: Tue, 28 Apr 2015 14:08:42 +0200	[thread overview]
Message-ID: <553F784A.4040004@suse.de> (raw)
In-Reply-To: <1430212264-9672-4-git-send-email-arei.gonglei@huawei.com>

Am 28.04.2015 um 11:11 schrieb arei.gonglei@huawei.com:
> From: Gonglei <arei.gonglei@huawei.com>
> 
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
>  hw/virtio/vhost-user.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index aefe0bb..e7ab829 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -128,7 +128,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
>  
>      r = qemu_chr_fe_read_all(chr, p, size);
>      if (r != size) {
> -        error_report("Failed to read msg header. Read %d instead of %d.\n", r,
> +        error_report("Failed to read msg header. Read %d instead of %d.", r,
>                  size);
>          goto fail;
>      }
> @@ -136,7 +136,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
>      /* validate received flags */
>      if (msg->flags != (VHOST_USER_REPLY_MASK | VHOST_USER_VERSION)) {
>          error_report("Failed to read msg header."
> -                " Flags 0x%x instead of 0x%x.\n", msg->flags,
> +                " Flags 0x%x instead of 0x%x.", msg->flags,
>                  VHOST_USER_REPLY_MASK | VHOST_USER_VERSION);
>          goto fail;
>      }
> @@ -144,7 +144,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
>      /* validate message size is sane */
>      if (msg->size > VHOST_USER_PAYLOAD_SIZE) {
>          error_report("Failed to read msg header."
> -                " Size %d exceeds the maximum %zu.\n", msg->size,
> +                " Size %d exceeds the maximum %zu.", msg->size,
>                  VHOST_USER_PAYLOAD_SIZE);
>          goto fail;
>      }
> @@ -155,7 +155,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
>          r = qemu_chr_fe_read_all(chr, p, size);
>          if (r != size) {
>              error_report("Failed to read msg payload."
> -                         " Read %d instead of %d.\n", r, msg->size);
> +                         " Read %d instead of %d.", r, msg->size);
>              goto fail;
>          }
>      }
> @@ -235,8 +235,8 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,
>          msg.memory.nregions = fd_num;
>  
>          if (!fd_num) {
> -            error_report("Failed initializing vhost-user memory map\n"
> -                    "consider using -object memory-backend-file share=on\n");
> +            error_report("Failed initializing vhost-user memory map, "
> +                    "consider using -object memory-backend-file share=on");

This one is not just dropping a trailing \n, but looks good to me,

Reviewed-by: Andreas Färber <afaerber@suse.de>

Thanks,
Andreas

>              return -1;
>          }
>  
> @@ -280,7 +280,7 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,
>          }
>          break;
>      default:
> -        error_report("vhost-user trying to send unhandled ioctl\n");
> +        error_report("vhost-user trying to send unhandled ioctl");
>          return -1;
>          break;
>      }
> @@ -296,27 +296,27 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,
>  
>          if (msg_request != msg.request) {
>              error_report("Received unexpected msg type."
> -                    " Expected %d received %d\n", msg_request, msg.request);
> +                    " Expected %d received %d", msg_request, msg.request);
>              return -1;
>          }
>  
>          switch (msg_request) {
>          case VHOST_USER_GET_FEATURES:
>              if (msg.size != sizeof(m.u64)) {
> -                error_report("Received bad msg size.\n");
> +                error_report("Received bad msg size.");
>                  return -1;
>              }
>              *((__u64 *) arg) = msg.u64;
>              break;
>          case VHOST_USER_GET_VRING_BASE:
>              if (msg.size != sizeof(m.state)) {
> -                error_report("Received bad msg size.\n");
> +                error_report("Received bad msg size.");
>                  return -1;
>              }
>              memcpy(arg, &msg.state, sizeof(struct vhost_vring_state));
>              break;
>          default:
> -            error_report("Received unexpected msg type.\n");
> +            error_report("Received unexpected msg type.");
>              return -1;
>              break;
>          }
> 


-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)

  reply	other threads:[~2015-04-28 12:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28  9:11 [Qemu-trivial] [PATCH 0/3] trivial patches arei.gonglei
2015-04-28  9:11 ` [Qemu-devel] " arei.gonglei
2015-04-28  9:11 ` [Qemu-trivial] [PATCH 1/3] target-mips: fix memory leak arei.gonglei
2015-04-28  9:11   ` [Qemu-devel] " arei.gonglei
2015-04-28 11:46   ` [Qemu-trivial] " Leon Alrae
2015-04-28 11:46     ` [Qemu-devel] " Leon Alrae
2015-04-28  9:11 ` [Qemu-trivial] [PATCH 2/3] xhci: remove unused code arei.gonglei
2015-04-28  9:11   ` [Qemu-devel] " arei.gonglei
2015-04-29  6:48   ` [Qemu-trivial] " Michael Tokarev
2015-04-29  6:48     ` [Qemu-devel] " Michael Tokarev
2015-04-29  7:22     ` [Qemu-trivial] " Gonglei
2015-04-29  7:22       ` Gonglei
2015-05-05  9:55       ` [Qemu-trivial] " Gerd Hoffmann
2015-05-05  9:55         ` Gerd Hoffmann
2015-05-05 10:18   ` [Qemu-trivial] " Michael Tokarev
2015-05-05 10:18     ` [Qemu-devel] " Michael Tokarev
2015-04-28  9:11 ` [Qemu-trivial] [PATCH 3/3] vhost-user: remove superfluous '\n' around error_report() arei.gonglei
2015-04-28  9:11   ` [Qemu-devel] " arei.gonglei
2015-04-28 12:08   ` Andreas Färber [this message]
2015-04-28 12:08     ` Andreas Färber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=553F784A.4040004@suse.de \
    --to=afaerber@suse.de \
    --cc=arei.gonglei@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.