From nobody Tue Feb 10 18:21:23 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666207144309710.2811739079227; Wed, 19 Oct 2022 12:19:04 -0700 (PDT) Received: from localhost ([::1]:49164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olEai-0004XW-DY for importer@patchew.org; Wed, 19 Oct 2022 15:19:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olEXT-0003bJ-Ox; Wed, 19 Oct 2022 15:15:40 -0400 Received: from cae.in-ulm.de ([217.10.14.231]:59340) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olEXR-0006Ti-Md; Wed, 19 Oct 2022 15:15:39 -0400 Received: by cae.in-ulm.de (Postfix, from userid 1000) id 6325C1402DC; Wed, 19 Oct 2022 21:15:25 +0200 (CEST) From: "Christian A. Ehrhardt" To: qemu-devel@nongnu.org Cc: "Christian A. Ehrhardt" , Eric DeVolder , qemu-stable@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH] hw/acpi/erst.c: Fix memset argument order Date: Wed, 19 Oct 2022 21:15:22 +0200 Message-Id: <20221019191522.1004804-1-lk@c--e.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 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: none client-ip=217.10.14.231; envelope-from=lk@c--e.de; helo=cae.in-ulm.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, SPF_HELO_NONE=0.001, SPF_NONE=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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1666207147057100001 Content-Type: text/plain; charset="utf-8" Fix memset argument order: The second argument is the value, the length goes last. Cc: Eric DeVolder Cc: qemu-stable@nongnu.org Fixes: f7e26ffa590 ("ACPI ERST: support for ACPI ERST feature") Signed-off-by: Christian A. Ehrhardt Reviewed-by: Alexander Bulekov Reviewed-by: Eric DeVolder Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/acpi/erst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c index df856b2669..26391f93ca 100644 --- a/hw/acpi/erst.c +++ b/hw/acpi/erst.c @@ -716,7 +716,7 @@ static unsigned write_erst_record(ERSTDeviceState *s) if (nvram) { /* Write the record into the slot */ memcpy(nvram, exchange, record_length); - memset(nvram + record_length, exchange_length - record_length, 0xF= F); + memset(nvram + record_length, 0xFF, exchange_length - record_lengt= h); /* If a new record, increment the record_count */ if (!record_found) { uint32_t record_count; --=20 2.34.1