From 1deb33af3ba315eda765fdcbd4cf5c4a17537c2f Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Mon, 16 Nov 2015 14:33:32 +0100 Subject: [PATCH 42/44] vhost-user: remove superfluous '\n' around error_report() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-id: <1447684235-15638-36-git-send-email-mst@redhat.com> Patchwork-id: 68376 O-Subject: [PATCH RHEV 7.3/7.2.z v2 35/36] vhost-user: remove superfluous '\n' around error_report() Bugzilla: 1279388 RH-Acked-by: Xiao Wang RH-Acked-by: Victor Kaplansky RH-Acked-by: Marcel Apfelbaum RH-Acked-by: Marc-André Lureau From: Gonglei Signed-off-by: Gonglei Reviewed-by: Andreas Färber Signed-off-by: Michael Tokarev (cherry-picked from commit ab7c5aaf31213f5fc96018514e3d258e951d520f) Signed-off-by: Miroslav Rezanina --- 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 a106fe2..192617d 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -152,7 +152,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; } @@ -160,7 +160,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; } @@ -168,7 +168,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; } @@ -179,7 +179,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; } } @@ -289,8 +289,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"); return -1; } @@ -335,7 +335,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; } @@ -351,7 +351,7 @@ 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; } @@ -360,20 +360,20 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request, case VHOST_USER_GET_PROTOCOL_FEATURES: case VHOST_USER_GET_QUEUE_NUM: 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; } -- 1.8.3.1