From nobody Tue Nov 4 21:33:04 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530719400815358.3885366744913; Wed, 4 Jul 2018 08:50:00 -0700 (PDT) Received: from localhost ([::1]:47846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fak2a-0006Ep-1c for importer@patchew.org; Wed, 04 Jul 2018 11:50:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fajt5-000788-Ah for qemu-devel@nongnu.org; Wed, 04 Jul 2018 11:40:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fajt4-0003fL-GN for qemu-devel@nongnu.org; Wed, 04 Jul 2018 11:40:11 -0400 Received: from mail-qk0-x22e.google.com ([2607:f8b0:400d:c09::22e]:37389) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fajt4-0003fA-Bt for qemu-devel@nongnu.org; Wed, 04 Jul 2018 11:40:10 -0400 Received: by mail-qk0-x22e.google.com with SMTP id t79-v6so3050196qke.4 for ; Wed, 04 Jul 2018 08:40:10 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id a127-v6sm2383795qkd.9.2018.07.04.08.40.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jul 2018 08:40:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sE0uh+fKO33UKv+KjwSBY9p4oPbsIi5sQHbLi6daccE=; b=W7F8jgmLu0jQf+A2+voIbrFQ7fMZs1FHFhIxbs9BB+/JMeubCfeF8o3nICiBa8hXws 62Uj9sty9iTNK6NS+tCo0XEV8ukhzcuN1VUxphW4l//zBunPAcUaYkcIvutg+0PK5cqC BP9do7vHE5Y5rNL1RUJV6uoWuJciz02Shs/4ptgkDnlY07Co+1RFL1PMobmcRemxjfNb nVns6MMsLpxHNflOm0c59Vsc4EL5qCOaR1qVIJj1bMX+Ln37WzWCGk0oA/e+bKAsXAq7 5r/L7F2TdSb/TfK7I/BNzG094Dpue54Ao/UQ8mAamz2ZaTeFV/37Aw9+GaTNeYahZnjJ v0rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=sE0uh+fKO33UKv+KjwSBY9p4oPbsIi5sQHbLi6daccE=; b=U+SmtG5s9KA2JgrzACLhc3HUxmc+A/ZxrEPF+JufpWKSeP5oOIyLqS/EJFZrEWwikQ tp8LmNtdnxKI9YAg6LgRc3Lr9clfFjU4Nb46w40y6DjC1CBOlWT+XZe7ftop1MNbdnHi yt0HRjIopY4gHimi4kd6piMftixTZZ67N20W07pDqj0nZliFTjCPRk5YKpBfFC0QK7yn wrVwIrqlc6/DxXEfqjVz/bLqeNn4zw4wVGRm/Cc7/fEniIhAcfeHezSlcvqDVshmpJoa UBbL0nRxjW6WEoZWxPHst8C32yfHP/HUmJEzK9Sesj7eQbP6plbzREPoDnUr17WZX/BU Kolw== X-Gm-Message-State: APt69E1O09ZyenXEP2AmmPVsAx8K1CsFhdkKsaOx26A0MF4iUMdPQDJ4 hXSudXkkMXm5uqlWhrUUsXJNItjY X-Google-Smtp-Source: AAOMgpfDp3+mWotcgGfeoM8N+h9xHzO7UnhTYRMX8s+/MJvrFAIz082qToVrnsV/9jUNdpBg+/P7pQ== X-Received: by 2002:a37:6b03:: with SMTP id g3-v6mr1975527qkc.21.1530718809859; Wed, 04 Jul 2018 08:40:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Laurent Vivier , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 4 Jul 2018 12:39:17 -0300 Message-Id: <20180704153919.12432-7-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180704153919.12432-1-f4bug@amsat.org> References: <20180704153919.12432-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::22e Subject: [Qemu-devel] [PATCH 6/8] 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: Gerd Hoffmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 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=C3=A9 Reviewed-by: Markus Armbruster --- 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 =20 - bytes =3D (DIV_ROUND_UP(w, 8)) * h; + bytes =3D DIV_ROUND_UP(w, 8) * h; =20 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 359693238b..3361432a51 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 =3D (uint8_t *)pixman_image_get_data(vd->guest.fb); guest_stride =3D pixman_image_get_stride(vd->guest.fb); - guest_ll =3D pixman_image_get_width(vd->guest.fb) * (DIV_ROUND_UP(= guest_bpp, 8)); + guest_ll =3D pixman_image_get_width(vd->guest.fb) + * DIV_ROUND_UP(guest_bpp, 8); } line_bytes =3D MIN(server_stride, guest_ll); =20 --=20 2.18.0