Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp755084lqt; Tue, 19 Mar 2024 02:54:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWluWELbR0gzx32X80SLU5+3SxA9BRvp2zC2hf/ow54NeqM0NbpWTH6UebWuTL4ya8wu12UNrh6Qu7zwX7CVMCggD+txsN2VSxq69pLOg== X-Google-Smtp-Source: AGHT+IHT8z6iTLduPHyoiwjSzS84xhc5P9EwG0vzoLl7UuyjWwGknXXPmenRForpuXP/h3mEaf0+ X-Received: by 2002:a05:6a20:5483:b0:1a3:6c9e:1e31 with SMTP id i3-20020a056a20548300b001a36c9e1e31mr3232540pzk.19.1710842039789; Tue, 19 Mar 2024 02:53:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710842039; cv=pass; d=google.com; s=arc-20160816; b=zA9k4/6HXuXvRuY3FZ+al126rg9sf1gqKteGXTqbrhu/broxawspxRtKdL1Y1xd1QG 7o/QYKjYyJPmnBGGg0pl9oetT3vv8jC5Cby8Ocs6YFimhDKMsw7CZ2CSQi4cM+iB73nu 9NAejfkHwu0ce1TYygsysZGCcaywf32Yy70dQj3x2VHSC3f+yRZD98I5vo3hpwTY99x9 mTVMphRrZsjQ2ymbr5Qht2RKcUuyF3CD2rnGvtae+P0rhFdn3W9SgcDhVs2OleptvOT3 8yinOT+Ozk96Tegy29XY3R8O56IR0shiPMPUNcqPiXbDm4k1OLRYMN3FvMimpcxZWxx9 V8eQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ze4clDGNeOXLUarNAWt/JBrwUAwP2GHN3YSCfqzhjpY=; fh=1apLYfXS6+ZpCx7WOexgYA4nBDec/uaBA0QcIOIjpts=; b=kQBSIKJOhgodHENqCcZ5PFTkuxFJ4ZdMENaeSftmKVkwpBVtDH7spf0KTHfVrMoouF cD0oY0LUnO/ARE8kj49izq1QWqDHOTonqqobnnWm9fUIvBX+6rn3x9GAk8FAEKvA6U2w XwpUXdaND5bn46jjxLze0N+KLMKuxW/I+j8A6StfJ1FYxMjQLSE6Kx9h5SauqAxQ+HB7 VeyV7wvpOnNQ1mnveDviqkr5m3qBKVpHgpJk2EYoj6tH5C5A52TQWXM5YSWy207XoEsg ZXG+lcVXnuN2kFP+7vz0JjmsyEqcQtBF20Y50GsvvQdh7TrHLL7yoSvXPG3yvTGLMoPw SeOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q2RkDZP3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-107333-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107333-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z16-20020a17090ad79000b0029c3ff6c354si10203363pju.148.2024.03.19.02.53.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 02:53:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107333-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q2RkDZP3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-107333-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107333-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 77E55282292 for ; Tue, 19 Mar 2024 09:53:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 315C87E567; Tue, 19 Mar 2024 09:53:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="q2RkDZP3" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A06F7E112; Tue, 19 Mar 2024 09:53:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710842011; cv=none; b=uF6SaeV13+CSyNWfEi3GU136UYNcWvGfCKOdF48TMo8tSXFdbq/TaGmjw3r3tO0gV7+mJDP4Xw5SnIIt+LmrZ8Bv2NsLmopGS5z7BkYNeExzzx6Srx/kCqXqCb7Y0Ekob8MtWQPfBr344ZhiRmWirBeKW1m+HmVPUYp1FvrIJBI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710842011; c=relaxed/simple; bh=Ucf0yaa98ebsbPc/z4MUwkKuOaXzJW6HowXlsm7quf0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M2+yXPNEg+DJPqomgS5PDiZS/0TIDa8mlu1ZP33M5yf2+cdvwkEHTXbfl5WIWWFxFo6/VuBsyoZoKlyiBF051Kgk0Yvphkgvnog4VuT1pJ/UPNfk3K11x7FKYg5a0t9+wL5yxQqkcXgrJ6APhEEcyHFo4S41XrGXofSO2cWVsrU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=q2RkDZP3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDB8AC433A6; Tue, 19 Mar 2024 09:53:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710842010; bh=Ucf0yaa98ebsbPc/z4MUwkKuOaXzJW6HowXlsm7quf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q2RkDZP34dEzUgsJBm5XFPmFhXHfsfKiF4IChT+sJxkyV3tkP7mmb7OUhvMzbohXd MNC4+urQrsCqrvpjw9lTMfNgWE+K31PCr0JL2dUbmU8wvYXqOWf3yTZDFW9F3K+FvI v6D6kFP9dS07igtcY14R2bnT6Kk35nbfCzVI+Y/BBXGsxuEzsa17wEWsXURLtAvIxR fIfk+084h7a+8gGsDVwj2JbjyeC0hCv3vxizIDE0d/nMk5RpSpIoOZoZuZgcd669si j44lCQzkQYIa4LrDvAW/X9WET2khvEDRKuO/tuVkJ9orVGpyf/e5lVTpXZwMtmbaLN tEkLzp27Lc67Q== From: "Jiri Slaby (SUSE)" To: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Stefani Seibold , Andrew Morton Subject: [RFT 01/15] kfifo: drop __kfifo_dma_out_finish_r() Date: Tue, 19 Mar 2024 10:53:00 +0100 Message-ID: <20240319095315.27624-2-jirislaby@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240319095315.27624-1-jirislaby@kernel.org> References: <20240319095315.27624-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit It is the same as __kfifo_skip_r(), so: * drop __kfifo_dma_out_finish_r() completely, and * replace its (only) use by __kfifo_skip_r(). Signed-off-by: Jiri Slaby (SUSE) Cc: Stefani Seibold Cc: Andrew Morton --- include/linux/kfifo.h | 4 +--- lib/kfifo.c | 8 -------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 0b35a41440ff..bc7a1f5bb0ce 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h @@ -797,7 +797,7 @@ __kfifo_int_must_check_helper( \ const size_t __recsize = sizeof(*__tmp->rectype); \ struct __kfifo *__kfifo = &__tmp->kfifo; \ if (__recsize) \ - __kfifo_dma_out_finish_r(__kfifo, __recsize); \ + __kfifo_skip_r(__kfifo, __recsize); \ else \ __kfifo->out += __len / sizeof(*__tmp->type); \ }) @@ -879,8 +879,6 @@ extern void __kfifo_dma_in_finish_r(struct __kfifo *fifo, extern unsigned int __kfifo_dma_out_prepare_r(struct __kfifo *fifo, struct scatterlist *sgl, int nents, unsigned int len, size_t recsize); -extern void __kfifo_dma_out_finish_r(struct __kfifo *fifo, size_t recsize); - extern unsigned int __kfifo_len_r(struct __kfifo *fifo, size_t recsize); extern void __kfifo_skip_r(struct __kfifo *fifo, size_t recsize); diff --git a/lib/kfifo.c b/lib/kfifo.c index 12f5a347aa13..958099cc4914 100644 --- a/lib/kfifo.c +++ b/lib/kfifo.c @@ -582,11 +582,3 @@ unsigned int __kfifo_dma_out_prepare_r(struct __kfifo *fifo, } EXPORT_SYMBOL(__kfifo_dma_out_prepare_r); -void __kfifo_dma_out_finish_r(struct __kfifo *fifo, size_t recsize) -{ - unsigned int len; - - len = __kfifo_peek_n(fifo, recsize); - fifo->out += len + recsize; -} -EXPORT_SYMBOL(__kfifo_dma_out_finish_r); -- 2.44.0