From nobody Mon Feb 9 08:32:20 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1765284703; cv=none; d=zohomail.com; s=zohoarc; b=RUsPdLvhoehWclAMMidxwc6s2ln9rzlBxKGQCjCWvi/ewcuwI0GHs1pVMeO7htjvyI5EgnEcQjzl3lDx+oW1UrvZhKz2mlg918GSTokk9IXmOqjjpDNtwItIVSqLJwfRdV6AKHpeLi/PK8Vr+MDzcO2H7nQZ8VgomwsbqxIQijA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1765284703; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Sender:Subject:Subject:To:To:Message-Id; bh=rF22Ng4wDe+1F1sHKgue1arGLlfsQ/miYOGwtnjqqN0=; b=Pl/rGru93Zl6eyoFR2+BGUZs7xZLxd7oTrnkt8ocqopbbmFvsxP9UjxYPLT7F3ZowucP0HBfbFARxo/x60zYlUwBnwJzG5skXliCzzc+lNVcrFYLV1a+ti4AIXBRn7GNSY4RANx/ZOx3C1X3DgfP+Xi0rMCSJwc15EtEMB1EuEo= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1765284703346694.0898745917187; Tue, 9 Dec 2025 04:51:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vSxBW-0007x1-C8; Tue, 09 Dec 2025 07:51:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vSxBN-0007wY-1P; Tue, 09 Dec 2025 07:51:09 -0500 Received: from mail.weilnetz.de ([37.120.169.71] helo=mail.v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vSxBI-0004ki-9d; Tue, 09 Dec 2025 07:51:06 -0500 Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by mail.v2201612906741603.powersrv.de (Postfix) with ESMTP id C758FDA0BCC; Tue, 09 Dec 2025 13:50:51 +0100 (CET) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id F0AB9460023; Tue, 09 Dec 2025 13:50:49 +0100 (CET) Authentication-Results: mail.v2201612906741603.powersrv.de; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=weilnetz.de (policy=none); spf=softfail (mail.v2201612906741603.powersrv.de: 188.68.58.204 is neither permitted nor denied by domain of stefan@weilnetz.de) smtp.mailfrom=stefan@weilnetz.de To: Peter Xu , Fabiano Rosas Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Stefan Weil Subject: [PATCH-for-10.2] Fix order of function arguments Date: Tue, 9 Dec 2025 13:50:49 +0100 Message-ID: <20251209125049.764095-1-sw@weilnetz.de> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: v2201612906741603 X-Rspamd-Queue-Id: C758FDA0BCC X-Spamd-Bar: ++ X-Spamd-Result: default: False [2.10 / 12.00]; VIOLATED_DIRECT_SPF(3.50)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; FORGED_SENDER(0.30)[sw@weilnetz.de,stefan@weilnetz.de]; ONCE_RECEIVED(0.20)[]; RCVD_NO_TLS_LAST(0.10)[]; DMARC_POLICY_SOFTFAIL(0.10)[weilnetz.de : No valid SPF, No valid DKIM,quarantine,sampled_out]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:197540, ipnet:188.68.56.0/22, country:DE]; FROM_NEQ_ENVFROM(0.00)[sw@weilnetz.de,stefan@weilnetz.de]; RCVD_COUNT_ONE(0.00)[1]; R_SPF_SOFTFAIL(0.00)[~all:c]; R_DKIM_NA(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Action: no action 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=37.120.169.71; envelope-from=stefan@weilnetz.de; helo=mail.v2201612906741603.powersrv.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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: , Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1765284705116158500 This fixes a compiler error when higher warning levels are enabled: ../migration/postcopy-ram.c: In function =E2=80=98postcopy_temp_pages_setup= =E2=80=99: ../migration/postcopy-ram.c:1483:50: error: =E2=80=98g_malloc0_n=E2=80=99 s= izes specified with =E2=80=98sizeof=E2=80=99 in the earlier argument and no= t in the later argument [-Werror=3Dcalloc-transposed-args] 1483 | mis->postcopy_tmp_pages =3D g_malloc0_n(sizeof(PostcopyTmpPage)= , channels); | ^~~~~~~~~~~~~~~ ../migration/postcopy-ram.c:1483:50: note: earlier argument should specify = number of elements, later size of each element Avoid also a related int/unsigned mismatch by fixing the type of two local variables. Signed-off-by: Stefan Weil Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- migration/postcopy-ram.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 3f98dcb6fd..8bef0192aa 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -1467,7 +1467,8 @@ retry: static int postcopy_temp_pages_setup(MigrationIncomingState *mis) { PostcopyTmpPage *tmp_page; - int err, i, channels; + int err; + unsigned i, channels; void *temp_page; =20 if (migrate_postcopy_preempt()) { @@ -1479,7 +1480,7 @@ static int postcopy_temp_pages_setup(MigrationIncomin= gState *mis) } =20 channels =3D mis->postcopy_channels; - mis->postcopy_tmp_pages =3D g_malloc0_n(sizeof(PostcopyTmpPage), chann= els); + mis->postcopy_tmp_pages =3D g_malloc0_n(channels, sizeof(PostcopyTmpPa= ge)); =20 for (i =3D 0; i < channels; i++) { tmp_page =3D &mis->postcopy_tmp_pages[i]; --=20 2.47.3