From patchwork Mon Jun 29 16:29:49 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 27104 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 901E0C3261 for ; Mon, 29 Jun 2026 16:31:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9DA2365F60; Mon, 29 Jun 2026 18:31:13 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Zbtap92l"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D7A8865F4E for ; Mon, 29 Jun 2026 18:30:26 +0200 (CEST) Received: from pb-laptop.local (185.221.140.128.nat.pool.zt.hu [185.221.140.128]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AE5108D4 for ; Mon, 29 Jun 2026 18:29:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1782750583; bh=gon94y9wMnnMOQcCwsKOys90ovyKUVLz6WnjDA3ne5E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Zbtap92lhhi4iONe5aNu1F0nmBbhjSGYk4oUlGSXzPXorfX8OXRbNnWgUO+YPWdVc yc6rNhMp4fysXonFv/4OGktGtWbT6PCYzqGdTS/lX5u3enwyr0uUoTS/TjET00t7eD kItgo8dRiEra/QiDtaad3SxZet4GYHkHb/KYqAqI= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v1 26/54] libcamera: request: doCancelRequest(): Remove Date: Mon, 29 Jun 2026 18:29:49 +0200 Message-ID: <20260629163017.863145-27-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260629163017.863145-1-barnabas.pocze@ideasonboard.com> References: <20260629163017.863145-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Now that request cancellation does not emit the `bufferCompleted` event for pending buffers (because there are no longer such things), the function need not be called from the destructor and it can be inlined into its only caller. Signed-off-by: Barnabás Pőcze --- include/libcamera/internal/request.h | 2 -- src/libcamera/request.cpp | 10 ++-------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/include/libcamera/internal/request.h b/include/libcamera/internal/request.h index 09768c6fcd..922d14f14c 100644 --- a/include/libcamera/internal/request.h +++ b/include/libcamera/internal/request.h @@ -40,8 +40,6 @@ private: friend class PipelineHandler; friend std::ostream &operator<<(std::ostream &out, const Request &r); - void doCancelRequest(); - Camera *camera_; bool cancelled_; uint32_t sequence_ = 0; diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index 9544a8993d..4df8b0f1ad 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -62,7 +62,6 @@ Request::Private::Private(Camera *camera) Request::Private::~Private() { - doCancelRequest(); } /** @@ -141,12 +140,6 @@ void Request::Private::complete() LIBCAMERA_TRACEPOINT(request_complete, this); } -void Request::Private::doCancelRequest() -{ - cancelled_ = true; - pending_ = 0; -} - /** * \brief Cancel a queued request * @@ -162,7 +155,8 @@ void Request::Private::cancel() Request *request = _o(); ASSERT(request->status() == RequestPending); - doCancelRequest(); + cancelled_ = true; + pending_ = 0; } /**