From patchwork Mon Jul 22 16:07:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 813723 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp1940918wro; Mon, 22 Jul 2024 09:08:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVzAql+iIyNzf+grdlgbbh48J6W+4cAb5NOJjXRi3EZ4T+iq2HlyI1+6ZhlZYuP0jLkIQzXwcZgV7h9pmkqPxma X-Google-Smtp-Source: AGHT+IG4voOjS4JvyqQSctc+PyyQ5KOUT8gINI0unRWU6MX+VyA/MVzzrqt6ZKR0TZ7o/YK00ayK X-Received: by 2002:ac8:7f0d:0:b0:446:5f73:fd2c with SMTP id d75a77b69052e-44fa5256659mr87379591cf.12.1721664511847; Mon, 22 Jul 2024 09:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721664511; cv=none; d=google.com; s=arc-20160816; b=VKiZODN+AQw3h5Zk0W9zz2+G/FxI81ow3aiCJB2Dwj70wNkoMPp+VUXt+wXOsFjGQs 5htleWaqrIGX2aL/0Sgqg2XwORvKf8wcrGusF3TI1ttKOxBwVV51ve7vZV+Agh6HEgbl 1NcQ92/QeP9VGUtGdXZa7lI2TcyPAnTzfw4oHhsSVWNH1eMPomVloZ0k9c1iP6w65XQU PplZDCtK3bFbizjhZ1hBJLxa646saF4h9im990Wzg4SPRILbPCv0V9HjUWzVBF4HM+Xs OuntEcTUAH25HdAwlgd3pgVBBmnBglMQZHUvPjZjOu/KIRDYItb9Du5gDMLB9Q98cPrZ xs/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=9OXBMV4qUioh74t9F5ySrsmXcQ3/BZ3r66GlJck4oz4=; fh=MEhq/VHzOQo5n9cgeJwdLgsvpLPR4lM+Lx+WVjQpjXw=; b=OOVgI9T2oew55dgAU/z0181D5JsGdxjyUad0sZdy6KRtfhrbjPYjLh25BSDwQlrY9R J5Dz2UYlmHXJKa6mHCFQ8pFXVzazS/6gCF37te4uxMIldUvQS3ieEPDuSgPhsI9bVTH8 glx9UFshsBf4anDu5U9UFaXDoZkAJuef36fCuwT0aY3qdrHHkHlHkyIFzsXs5W65OR5U +4sVYghEF3Gw4cEOa04Jn18aNtnRJq+jeaZ88EhUEX5W9xbPoUvTSo/2vhIP8/tGQM3W 2kX+A3VYaVsLaJbm9RqcJDH9r9/ieJiaIHjF4hnX12fLnJHOfWV96gs8eL/PtrV3eRk/ L81A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YrWD88Qo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44f9cdb8599si79848471cf.303.2024.07.22.09.08.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2024 09:08:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YrWD88Qo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVvZv-0005L4-Aj; Mon, 22 Jul 2024 12:07:59 -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 1sVvZq-00055J-7H for qemu-devel@nongnu.org; Mon, 22 Jul 2024 12:07:54 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVvZo-0007fe-Hh for qemu-devel@nongnu.org; Mon, 22 Jul 2024 12:07:53 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-36887ca3da2so1874392f8f.2 for ; Mon, 22 Jul 2024 09:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721664469; x=1722269269; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9OXBMV4qUioh74t9F5ySrsmXcQ3/BZ3r66GlJck4oz4=; b=YrWD88QoRVS359JEH3k6CVsgZVP1+EUlYHYbFfv46q8dos/oHe02uiY6t7lUc/pW4I rjBYTAsCm45CUssQ97GQpnAtgPjndTCSicGLZCqmfjXwGYRwPmzFlcyg94UB7fcUixEB Mh4xRLBXQZAY88z+IY/3M2AqnycHQOBEtYW3ZQ2sFPlFQIkmdYkSBm3SXwp/s0vxJzG0 nTbm7eZCwMrVkpr+g+8k+zwIz+2OWfUb1XhserRwPEKeTTj04wv62vSV/Rwux6kliDJ0 hN/NHJ1jibom3kBQHdVNeBUDXLZ/BaJgrwyqereDN/xa2tstJPKeREhWOrWtPwiVHyk0 qKuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721664469; x=1722269269; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9OXBMV4qUioh74t9F5ySrsmXcQ3/BZ3r66GlJck4oz4=; b=qJ7fWz7EAiVKpNAMV52EHFIGfpbDI8957NKFWHkCXpyFJNOYmU5Al8Twn6M224pNQ2 gzwdyKlm+xgSiYHJcmjf8F6zbRm9RPXqnrm87qa8/6KZLBqLIq1gE5jvVuiel38YzUbW jwN+WxQ51bFh09c+nvRmbRjP46h5pK8i0dCCL9fcxTcJCerBtoJR1+3V+RdYtYqi2ahn BBJsPg+0U1uKWWtWpBwCkbnxb3iOz8HOsWMpNxkKqWRBpVBtfS1eX00/YD8lpto82Gba BCavKRMYvO3S0U0/Kyp8Ih7G/RkXVJG8Pc+7wt2nSoc9DjfrtTckaBu6Gi6dJH29QbF0 dWeQ== X-Gm-Message-State: AOJu0Yxr6wcbqzeIHqup2bzK4aKiWKpGRYCyDWmjoro++6V+rH4w414B QIXMiJQ94sPTfc1CcosyhIvDSgHZ8i1u3BCVpDfm+wn+HTduQUSbj7tl71/5qZzAtJUicvqi/mo A X-Received: by 2002:a5d:4e45:0:b0:367:991f:4377 with SMTP id ffacd0b85a97d-369dee62a5cmr205724f8f.58.1721664468689; Mon, 22 Jul 2024 09:07:48 -0700 (PDT) Received: from localhost.localdomain (gen92-h02-176-184-20-254.dsl.sta.abo.bbox.fr. [176.184.20.254]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-368787ebd50sm8868499f8f.93.2024.07.22.09.07.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 22 Jul 2024 09:07:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org, Philippe =?unknown-8bit?q?Mathieu-Daud=C3=A9?= Subject: [PATCH v2 0/7] util/fifo8: Rework fifo8_pop_buf() Date: Mon, 22 Jul 2024 18:07:38 +0200 Message-ID: <20240722160745.67904-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Rename current fifo8_pop_buf() as fifo8_pop_constbuf() and expose ESP's fifo8_pop_buf() which takes care of wrapped FIFO buffer. Supersedes: <20240719151628.46253-1-philmd@linaro.org> util/fifo8: Introduce fifo8_change_capacity() Philippe Mathieu-Daudé (7): chardev/char-fe: Document returned value on error util/fifo8: Fix style util/fifo8: Use fifo8_reset() in fifo8_create() util/fifo8: Rename fifo8_peek_buf() -> fifo8_peek_constbuf() util/fifo8: Rename fifo8_pop_buf() -> fifo8_pop_constbuf() util/fifo8: Expose fifo8_pop_buf() util/fifo8: Introduce fifo8_discard() include/chardev/char-fe.h | 3 +++ include/qemu/fifo8.h | 50 ++++++++++++++++++++++++--------------- chardev/msmouse.c | 2 +- hw/char/goldfish_tty.c | 4 ++-- hw/net/allwinner_emac.c | 2 +- hw/scsi/esp.c | 38 ++++------------------------- ui/console-vc.c | 2 +- ui/gtk.c | 2 +- util/fifo8.c | 48 +++++++++++++++++++++++++++++++------ 9 files changed, 85 insertions(+), 66 deletions(-)