From nobody Sun Nov 24 09:00:04 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1726057465; cv=none; d=zohomail.com; s=zohoarc; b=SBzV0ZYtNj0/TxBXn23DMk4q8mXL7ugEUZhMpPVIRLiLxjs6REpYnXYLtB0/qhVRn75Ck1wqNAd/4wgajR9ybox9khlVsgIFwEwotY2Gj+dSEI+MSR7eOx4mXP2H98BHWtqSZdnyMU8pC+qtHtXEMqnmE4DMG9HEQRJR7VbqrSY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726057465; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pxSgJSSxDK73WSQ/reDz72E9qOvMV6LMGI8MzcCZ4P8=; b=CMnlBXCyoZIn76wmvgy60pzSD2XE4+aJQy+qvQyKHdxF9Q46qkoQY6UkpM4HurKQeRRZAT6x7KavReLUAhCLHfwgyFm4zedFECiZsA+Z+F3+jCoxKkrpcotWd6a7WUAEFccEH67C1ZmC6shMTiVMnWeHI0UGH8ANQXAHJwPLopg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1726057465956232.40176709619766; Wed, 11 Sep 2024 05:24:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1soMJu-0002hN-ML; Wed, 11 Sep 2024 08:19:38 -0400 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 1soMJ0-0005ti-Da for qemu-devel@nongnu.org; Wed, 11 Sep 2024 08:18:43 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soMIy-0007e8-MB for qemu-devel@nongnu.org; Wed, 11 Sep 2024 08:18:42 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-374c7e64b60so1125687f8f.2 for ; Wed, 11 Sep 2024 05:18:40 -0700 (PDT) Received: from m1x-phil.lan ([176.187.196.107]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d2ee6sm11368723f8f.83.2024.09.11.05.18.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Sep 2024 05:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726057118; x=1726661918; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pxSgJSSxDK73WSQ/reDz72E9qOvMV6LMGI8MzcCZ4P8=; b=q+5lYRvHAz8Q2gz4uc5N8N33QZCXfL6XdWE/mUTiOcnF7VE5JcsjeG4jofsPvpzvSW pIE/mR/DavWtJyO5hP0R8RwGJ+80dwMsaCZ5M49IIkSjN3NdTVHzoiQcMBl0zJ3Pwa9T jjVSVebXbzCW1sQU8S/Ob9WaX4YPgAxoCrF/VLn/Y1HB6kLishala+RYf308B2et5XTY 6Y9By+ltITmCEieFbrFQZpPoS59blEIH8QZ2P6qpHjYYEloN7luO1ekjdpTftclfTq5s xAa59VjNFIH+sQYwOOrUvZnP5Ib4Ejo+NgGBsohzM000SDrudxpxbZPUXs/3NlHAMqBF 6zcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726057118; x=1726661918; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pxSgJSSxDK73WSQ/reDz72E9qOvMV6LMGI8MzcCZ4P8=; b=nw/JzdMLStk83Ba0x9ugmQm9ESMjN2EgOY7qV6iAB537o4/sIvxcpHc2wdSGkzDB5r X9VQZ+KU6+iqaVrQyPRlRsrLxBqXclges617iyoPrEU1axkhnuXbBtlpc635hVjS+wnN tB7iWKcbt9aL22UC6RWOwFR3BjeUAsa8ZD4/NA+sk/gSPueyn7+L8vAofYqe2AjNXkbq N2ekhzRylK5nbl1KFJzlzoxheE2k3SdQcLGNhf1aZGm6I7L1Ys02NK0MntHuB0DCBn5U nAQVry3HCYP5m7oo4WNQYwQ4hagUuyZH4TzK5eD0SjiDBeKTV/l8mkYnRpxumZjCfUBp +rWQ== X-Gm-Message-State: AOJu0YwoAJe2R3Fd0f8jUFaV/TWIraMNE7xpWmI7mLLjWNNIDz2SZJN4 +YU94MmLUsoKW28CMwFXeLWlRl5PvsZ7MqvZfVZpK5amHhEJwT7czG+9n4wKHhyDYl7vZeEYV2R Z X-Google-Smtp-Source: AGHT+IFja6mpvCYl0hIZShGO9uDLrHXeYb4P4urQxjFgGEJi+ysiXaR9ipT2ZTvxCkl8/CrKaMRsaw== X-Received: by 2002:a05:6000:1cc9:b0:36d:2984:ef6b with SMTP id ffacd0b85a97d-378b0796598mr1697529f8f.11.1726057118460; Wed, 11 Sep 2024 05:18:38 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Octavian Purdila , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 35/56] fifo8: replace fifo8_pop_bufptr() with fifo8_peekpop_bufptr() in fifo8_pop_buf() Date: Wed, 11 Sep 2024 14:14:00 +0200 Message-ID: <20240911121422.52585-36-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240911121422.52585-1-philmd@linaro.org> References: <20240911121422.52585-1-philmd@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1726057468186116600 From: Mark Cave-Ayland The upcoming peek functionality will require passing a non-zero value to fifo8_peekpop_bufptr(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Octavian Purdila Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240828122258.928947-5-mark.cave-ayland@ilande.co.uk> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- util/fifo8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/fifo8.c b/util/fifo8.c index 62d6430b05..efe0117b1f 100644 --- a/util/fifo8.c +++ b/util/fifo8.c @@ -116,7 +116,7 @@ uint32_t fifo8_pop_buf(Fifo8 *fifo, uint8_t *dest, uint= 32_t destlen) } =20 len =3D destlen; - buf =3D fifo8_pop_bufptr(fifo, len, &n1); + buf =3D fifo8_peekpop_bufptr(fifo, len, 0, &n1, true); if (dest) { memcpy(dest, buf, n1); } @@ -125,7 +125,7 @@ uint32_t fifo8_pop_buf(Fifo8 *fifo, uint8_t *dest, uint= 32_t destlen) len -=3D n1; len =3D MIN(len, fifo8_num_used(fifo)); if (len) { - buf =3D fifo8_pop_bufptr(fifo, len, &n2); + buf =3D fifo8_peekpop_bufptr(fifo, len, 0, &n2, true); if (dest) { memcpy(&dest[n1], buf, n2); } --=20 2.45.2