From patchwork Mon Aug 27 08:53:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 10576667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9908F15A7 for ; Mon, 27 Aug 2018 08:57:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D9CF29309 for ; Mon, 27 Aug 2018 08:57:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41AB42930C; Mon, 27 Aug 2018 08:57:58 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 EA64729309 for ; Mon, 27 Aug 2018 08:57:57 +0000 (UTC) Received: from localhost ([::1]:52050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuDLR-000260-3i for patchwork-qemu-devel@patchwork.kernel.org; Mon, 27 Aug 2018 04:57:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuDHA-0005XE-49 for qemu-devel@nongnu.org; Mon, 27 Aug 2018 04:53:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fuDH6-0004lB-BI for qemu-devel@nongnu.org; Mon, 27 Aug 2018 04:53:31 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56024 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fuDH6-0004kW-32 for qemu-devel@nongnu.org; Mon, 27 Aug 2018 04:53:28 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8C14140200B3; Mon, 27 Aug 2018 08:53:27 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-138.ams2.redhat.com [10.36.117.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 481E6202704E; Mon, 27 Aug 2018 08:53:27 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 07C4231E42; Mon, 27 Aug 2018 10:53:22 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 27 Aug 2018 10:53:18 +0200 Message-Id: <20180827085320.9732-11-kraxel@redhat.com> In-Reply-To: <20180827085320.9732-1-kraxel@redhat.com> References: <20180827085320.9732-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 27 Aug 2018 08:53:27 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 27 Aug 2018 08:53:27 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 10/12] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro 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: libvir-list@redhat.com, Gerd Hoffmann , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Philippe Mathieu-Daudé Patch created mechanically by rerunning: $ spatch --sp-file scripts/coccinelle/round.cocci \ --macro-file scripts/cocci-macro-file.h \ --dir . --in-place Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180704153919.12432-7-f4bug@amsat.org> Signed-off-by: Gerd Hoffmann --- ui/vnc-enc-tight.c | 2 +- ui/vnc.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index f38aceb4da..0b4a5ac71f 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -979,7 +979,7 @@ static int send_mono_rect(VncState *vs, int x, int y, } #endif - bytes = (DIV_ROUND_UP(w, 8)) * h; + bytes = DIV_ROUND_UP(w, 8) * h; vnc_write_u8(vs, (stream | VNC_TIGHT_EXPLICIT_FILTER) << 4); vnc_write_u8(vs, VNC_TIGHT_FILTER_PALETTE); diff --git a/ui/vnc.c b/ui/vnc.c index fd929b0957..ccb1335d86 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2967,7 +2967,8 @@ static int vnc_refresh_server_surface(VncDisplay *vd) PIXMAN_FORMAT_BPP(pixman_image_get_format(vd->guest.fb)); guest_row0 = (uint8_t *)pixman_image_get_data(vd->guest.fb); guest_stride = pixman_image_get_stride(vd->guest.fb); - guest_ll = pixman_image_get_width(vd->guest.fb) * (DIV_ROUND_UP(guest_bpp, 8)); + guest_ll = pixman_image_get_width(vd->guest.fb) + * DIV_ROUND_UP(guest_bpp, 8); } line_bytes = MIN(server_stride, guest_ll);