From patchwork Sat Oct 29 01:10:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9402969 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9AECB6022E for ; Sat, 29 Oct 2016 01:10:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 859C02A28C for ; Sat, 29 Oct 2016 01:10:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 785972A6E9; Sat, 29 Oct 2016 01:10:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6109E2A28C for ; Sat, 29 Oct 2016 01:10:58 +0000 (UTC) Received: from localhost ([::1]:52618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0IAj-0006o2-Cq for patchwork-qemu-devel@patchwork.kernel.org; Fri, 28 Oct 2016 21:10:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0IAA-0006mY-Fz for qemu-devel@nongnu.org; Fri, 28 Oct 2016 21:10:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0IA8-0003lK-LX for qemu-devel@nongnu.org; Fri, 28 Oct 2016 21:10:22 -0400 Received: from mail.kernel.org ([198.145.29.136]:34390) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c0IA8-0003l1-D0 for qemu-devel@nongnu.org; Fri, 28 Oct 2016 21:10:20 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 897FB2041F; Sat, 29 Oct 2016 01:10:18 +0000 (UTC) Received: from sstabellini-ThinkPad-X260.hsd1.ca.comcast.net (96-82-76-110-static.hfc.comcastbusiness.net [96.82.76.110]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0A93720458; Sat, 29 Oct 2016 01:10:16 +0000 (UTC) From: Stefano Stabellini To: peter.maydell@linaro.org Date: Fri, 28 Oct 2016 18:10:02 -0700 Message-Id: <1477703413-18852-2-git-send-email-sstabellini@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477703413-18852-1-git-send-email-sstabellini@kernel.org> References: <1477703413-18852-1-git-send-email-sstabellini@kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 198.145.29.136 Subject: [Qemu-devel] [PULL 02/13] xen: Fix coding style warnings X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Quan Xu , sstabellini@kernel.org, qemu-devel@nongnu.org, anthony.perard@citrix.com, xen-devel@lists.xenproject.org, Emil Condrea Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Emil Condrea Fixes: * WARNING: line over 80 characters Signed-off-by: Emil Condrea Signed-off-by: Stefano Stabellini Signed-off-by: Quan Xu Acked-by: Anthony PERARD --- hw/block/xen_disk.c | 3 ++- hw/char/xen_console.c | 3 ++- hw/display/xenfb.c | 6 ++++-- hw/net/xen_nic.c | 12 ++++++++---- hw/xen/xen_backend.c | 15 ++++++++++----- include/hw/xen/xen_backend.h | 8 +++++--- 6 files changed, 31 insertions(+), 16 deletions(-) diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index 1292a4b..5b037e7 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_disk.c @@ -1068,7 +1068,8 @@ static int blk_connect(struct XenDevice *xendev) blk_set_enable_write_cache(blkdev->blk, !writethrough); } else { /* setup via qemu cmdline -> already setup for us */ - xen_be_printf(&blkdev->xendev, 2, "get configured bdrv (cmdline setup)\n"); + xen_be_printf(&blkdev->xendev, 2, + "get configured bdrv (cmdline setup)\n"); blkdev->blk = blk_by_legacy_dinfo(blkdev->dinfo); if (blk_is_read_only(blkdev->blk) && !readonly) { xen_be_printf(&blkdev->xendev, 0, "Unexpected read-only drive"); diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c index d236a46..9ae9558 100644 --- a/hw/char/xen_console.c +++ b/hw/char/xen_console.c @@ -248,7 +248,8 @@ static int con_initialise(struct XenDevice *xendev) qemu_chr_fe_set_handlers(&con->chr, xencons_can_receive, xencons_receive, NULL, con, NULL, true); - xen_be_printf(xendev, 1, "ring mfn %d, remote port %d, local port %d, limit %zd\n", + xen_be_printf(xendev, 1, + "ring mfn %d, remote port %d, local port %d, limit %zd\n", con->ring_ref, con->xendev.remote_port, con->xendev.local_port, diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index eaa1fce..d458fc1 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -561,7 +561,8 @@ static int xenfb_configure_fb(struct XenFB *xenfb, size_t fb_len_lim, xenfb->offset = offset; xenfb->up_fullscreen = 1; xenfb->do_resize = 1; - xen_be_printf(&xenfb->c.xendev, 1, "framebuffer %dx%dx%d offset %d stride %d\n", + xen_be_printf(&xenfb->c.xendev, 1, + "framebuffer %dx%dx%d offset %d stride %d\n", width, height, depth, offset, row_stride); return 0; } @@ -729,7 +730,8 @@ static void xenfb_update(void *opaque) break; } dpy_gfx_replace_surface(xenfb->c.con, surface); - xen_be_printf(&xenfb->c.xendev, 1, "update: resizing: %dx%d @ %d bpp%s\n", + xen_be_printf(&xenfb->c.xendev, 1, + "update: resizing: %dx%d @ %d bpp%s\n", xenfb->width, xenfb->height, xenfb->depth, is_buffer_shared(surface) ? " (shared)" : ""); xenfb->up_fullscreen = 1; diff --git a/hw/net/xen_nic.c b/hw/net/xen_nic.c index 9d93466..dbf3a89 100644 --- a/hw/net/xen_nic.c +++ b/hw/net/xen_nic.c @@ -140,7 +140,8 @@ static void net_tx_packets(struct XenNetDev *netdev) #endif if (txreq.size < 14) { - xen_be_printf(&netdev->xendev, 0, "bad packet size: %d\n", txreq.size); + xen_be_printf(&netdev->xendev, 0, "bad packet size: %d\n", + txreq.size); net_tx_error(netdev, &txreq, rc); continue; } @@ -213,7 +214,8 @@ static void net_rx_response(struct XenNetDev *netdev, resp->status = (int16_t)st; } - xen_be_printf(&netdev->xendev, 3, "rx response: idx %d, status %d, flags 0x%x\n", + xen_be_printf(&netdev->xendev, 3, + "rx response: idx %d, status %d, flags 0x%x\n", i, resp->status, resp->flags); netdev->rx_ring.rsp_prod_pvt = ++i; @@ -256,7 +258,8 @@ static ssize_t net_rx_packet(NetClientState *nc, const uint8_t *buf, size_t size netdev->xendev.dom, rxreq.gref, PROT_WRITE); if (page == NULL) { - xen_be_printf(&netdev->xendev, 0, "error: rx gref dereference failed (%d)\n", + xen_be_printf(&netdev->xendev, 0, + "error: rx gref dereference failed (%d)\n", rxreq.gref); net_rx_response(netdev, &rxreq, NETIF_RSP_ERROR, 0, 0, 0); return -1; @@ -330,7 +333,8 @@ static int net_connect(struct XenDevice *xendev) rx_copy = 0; } if (rx_copy == 0) { - xen_be_printf(&netdev->xendev, 0, "frontend doesn't support rx-copy.\n"); + xen_be_printf(&netdev->xendev, 0, + "frontend doesn't support rx-copy.\n"); return -1; } diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c index 545ee47..0e95880 100644 --- a/hw/xen/xen_backend.c +++ b/hw/xen/xen_backend.c @@ -53,7 +53,8 @@ struct xs_dirs { static QTAILQ_HEAD(xs_dirs_head, xs_dirs) xs_cleanup = QTAILQ_HEAD_INITIALIZER(xs_cleanup); -static QTAILQ_HEAD(XenDeviceHead, XenDevice) xendevs = QTAILQ_HEAD_INITIALIZER(xendevs); +static QTAILQ_HEAD(XenDeviceHead, XenDevice) xendevs = + QTAILQ_HEAD_INITIALIZER(xendevs); static int debug; /* ------------------------------------------------------------- */ @@ -205,7 +206,8 @@ int xenstore_read_fe_int(struct XenDevice *xendev, const char *node, int *ival) return xenstore_read_int(xendev->fe, node, ival); } -int xenstore_read_fe_uint64(struct XenDevice *xendev, const char *node, uint64_t *uval) +int xenstore_read_fe_uint64(struct XenDevice *xendev, const char *node, + uint64_t *uval) { return xenstore_read_uint64(xendev->fe, node, uval); } @@ -385,7 +387,8 @@ static void xen_be_frontend_changed(struct XenDevice *xendev, const char *node) g_free(xendev->protocol); xendev->protocol = xenstore_read_fe_str(xendev, "protocol"); if (xendev->protocol) { - xen_be_printf(xendev, 1, "frontend protocol: %s\n", xendev->protocol); + xen_be_printf(xendev, 1, "frontend protocol: %s\n", + xendev->protocol); } } @@ -617,7 +620,8 @@ static int xenstore_scan(const char *type, int dom, struct XenDevOps *ops) snprintf(token, sizeof(token), "be:%p:%d:%p", type, dom, ops); snprintf(path, sizeof(path), "backend/%s/%d", type, dom); if (!xs_watch(xenstore, path, token)) { - xen_be_printf(NULL, 0, "xen be: watching backend path (%s) failed\n", path); + xen_be_printf(NULL, 0, "xen be: watching backend path (%s) failed\n", + path); return -1; } @@ -830,7 +834,8 @@ int xen_be_send_notify(struct XenDevice *xendev) * 2 == noisy debug messages (logfile only). * 3 == will flood your log (logfile only). */ -void xen_be_printf(struct XenDevice *xendev, int msg_level, const char *fmt, ...) +void xen_be_printf(struct XenDevice *xendev, int msg_level, + const char *fmt, ...) { va_list args; diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h index 0df282a..5b02386 100644 --- a/include/hw/xen/xen_backend.h +++ b/include/hw/xen/xen_backend.h @@ -79,7 +79,8 @@ int xenstore_read_be_int(struct XenDevice *xendev, const char *node, int *ival); char *xenstore_read_fe_str(struct XenDevice *xendev, const char *node); int xenstore_read_fe_int(struct XenDevice *xendev, const char *node, int *ival); int xenstore_read_uint64(const char *base, const char *node, uint64_t *uval); -int xenstore_read_fe_uint64(struct XenDevice *xendev, const char *node, uint64_t *uval); +int xenstore_read_fe_uint64(struct XenDevice *xendev, const char *node, + uint64_t *uval); const char *xenbus_strstate(enum xenbus_state state); struct XenDevice *xen_be_find_xendev(const char *type, int dom, int dev); @@ -93,8 +94,9 @@ int xen_be_set_state(struct XenDevice *xendev, enum xenbus_state state); int xen_be_bind_evtchn(struct XenDevice *xendev); void xen_be_unbind_evtchn(struct XenDevice *xendev); int xen_be_send_notify(struct XenDevice *xendev); -void xen_be_printf(struct XenDevice *xendev, int msg_level, const char *fmt, ...) - GCC_FMT_ATTR(3, 4); +void xen_be_printf(struct XenDevice *xendev, int msg_level, + const char *fmt, ...) GCC_FMT_ATTR(3, 4); + /* actual backend drivers */ extern struct XenDevOps xen_console_ops; /* xen_console.c */