From nobody Tue Feb 10 03:40:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1639564945872240.7544171500108; Wed, 15 Dec 2021 02:42:25 -0800 (PST) Received: from localhost ([::1]:34972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxRjs-00088J-R6 for importer@patchew.org; Wed, 15 Dec 2021 05:42:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxRaV-0002yb-1q for qemu-devel@nongnu.org; Wed, 15 Dec 2021 05:32:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:47860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxRaS-0007Hk-Et for qemu-devel@nongnu.org; Wed, 15 Dec 2021 05:32:42 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-495-2nRsaIw4OPuWqEwR-42bvA-1; Wed, 15 Dec 2021 05:32:35 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3C75E10144E0; Wed, 15 Dec 2021 10:32:34 +0000 (UTC) Received: from secure.mitica (unknown [10.39.192.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9986275C43; Wed, 15 Dec 2021 10:32:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639564358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ueqG1EF3qxBlRxx0QWcB94/JCSj03U7TM7FSAKTreEA=; b=Vz7o2Vctxyfr19pWRqnWg5/ybE5CQIlxgPPysqvcbyPWx3ANjfJ/BlCpCnouPZiuqkDLY/ f3wYJWkcJI2SMNfohC/qxBWmH4wfX7xHaua0oQyM4OfWgoNih/i0tyO8EZ2/AF51wKoTBM EWX6sgyM8ktDlmudh4DzNAsupdBaiU0= X-MC-Unique: 2nRsaIw4OPuWqEwR-42bvA-1 From: Juan Quintela To: qemu-devel@nongnu.org Subject: [PULL 06/18] dump: Remove is_zero_page() Date: Wed, 15 Dec 2021 11:32:06 +0100 Message-Id: <20211215103218.17527-7-quintela@redhat.com> In-Reply-To: <20211215103218.17527-1-quintela@redhat.com> References: <20211215103218.17527-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=quintela@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.719, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Hailiang Zhang , Richard Henderson , "Dr. David Alan Gilbert" , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1639564946982100001 It just calls buffer_is_zero(). Just change the callers. Signed-off-by: Juan Quintela Reviewed-by: Richard Henderson Reviewed-by: Marc-Andr=C3=A9 Lureau --- dump/dump.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index 662d0a62cd..a84d8b1598 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -1293,14 +1293,6 @@ static size_t get_len_buf_out(size_t page_size, uint= 32_t flag_compress) return 0; } =20 -/* - * check if the page is all 0 - */ -static inline bool is_zero_page(const uint8_t *buf, size_t page_size) -{ - return buffer_is_zero(buf, page_size); -} - static void write_dump_pages(DumpState *s, Error **errp) { int ret =3D 0; @@ -1357,7 +1349,7 @@ static void write_dump_pages(DumpState *s, Error **er= rp) */ while (get_next_page(&block_iter, &pfn_iter, &buf, s)) { /* check zero page */ - if (is_zero_page(buf, s->dump_info.page_size)) { + if (buffer_is_zero(buf, s->dump_info.page_size)) { ret =3D write_cache(&page_desc, &pd_zero, sizeof(PageDescripto= r), false); if (ret < 0) { --=20 2.33.1