From nobody Fri Dec 19 08:04:05 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 153080686071697.65566654780457; Thu, 5 Jul 2018 09:07:40 -0700 (PDT) Received: from localhost ([::1]:53481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb6nD-0002k0-VQ for importer@patchew.org; Thu, 05 Jul 2018 12:07:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb6eX-0004VS-4w for qemu-devel@nongnu.org; Thu, 05 Jul 2018 11:58:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fb6eW-00059I-7v for qemu-devel@nongnu.org; Thu, 05 Jul 2018 11:58:41 -0400 Received: from mail-qk0-x22a.google.com ([2607:f8b0:400d:c09::22a]:41967) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fb6eT-00057X-Qu; Thu, 05 Jul 2018 11:58:37 -0400 Received: by mail-qk0-x22a.google.com with SMTP id d22-v6so4726080qkc.8; Thu, 05 Jul 2018 08:58:37 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id k66-v6sm4049403qkc.86.2018.07.05.08.58.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 08:58:36 -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=7jk0p4Rd3k4Rl38xTVYEubeLyAEXH/6lD0K5gtczN1k=; b=TQd4NmSVee9J6sYVVleRoHmvqW+mvXL6hIgqlC8bxK20fOTVgKpJuRJMDA5xbspSd4 icm8V0X1ahZREGFkGJVuJbpbnWPy6Q7omVOZZNEGXmAYqAyoJrU6iMJVFhPFxvAzjvz+ vfHdhhz8fKi9cj2DyF9hL5U4aw7sfcYEe/IL0/ZeBgNAkoMP8ALaAR3PlRAZSGG6NO5u IAv+lnfZUWxfqhv5my58ls6EDKx80PzX+qPLT2qT3R9ZhZzXvcmGLmSe9Ddyn73iPiEU vvOC9FaEfqqgitlEEk/aC58DtVxxUy7IUrFT9wnFNC7H6CapDmZ4XfyMdqXpJjIkmtir VYDg== 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=7jk0p4Rd3k4Rl38xTVYEubeLyAEXH/6lD0K5gtczN1k=; b=lgBiX6DGZBUL/lnF4H+8resudn2UJJwJ4Du4DENXSW+iaymgh3Tg8QBZReGlaebWie UCupGFGV5VtUNbqaRO4xIQHsPB2EXQgNVt5wb6oViv0BbP2N6LeNH0YngL7NCEufb5w5 2LoXezM1kA5nx5n6ZiO0S1iiwB2jRHvuNBKJqnfB12zgSb35A52PU5o0lli3F+7q3rzL NO9IWxvTeq5IuY2YTiv6sBZByltr2bj8+wwUNB530bWnt7TCn12QSke/SoQY/MHbS1S2 +lDzM4u+InWFEE59+hFi040/dD8SutXVLnfUuWIabYhtgeUfuEjZcZAhX7iFXAgnWGtG lZwg== X-Gm-Message-State: APt69E1oSxqDnjDvHX2cA+NyZ97kzGStqTQK2RwJdKnk9sVkG4XBI6Px XNIn4r0d49JfRg6RgwkRGh5A4XTa X-Google-Smtp-Source: AAOMgpf5cPkhlzFGQkiIoZm6nP/whZVtyBkMh6BeHCZaudgjAj08tlp60fqQ7FSpwgsGoeBj95ZpiQ== X-Received: by 2002:a37:b507:: with SMTP id e7-v6mr5583091qkf.31.1530806317121; Thu, 05 Jul 2018 08:58:37 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-trivial@nongnu.org Date: Thu, 5 Jul 2018 12:58:09 -0300 Message-Id: <20180705155811.20366-6-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180705155811.20366-1-f4bug@amsat.org> References: <20180705155811.20366-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::22a Subject: [Qemu-devel] [PATCH v2 5/7] 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 Acked-by: Michael S. Tsirkin --- 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