[RFC,v1,26/54] libcamera: request: doCancelRequest(): Remove
diff mbox series

Message ID 20260629163017.863145-27-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • libcamera: Split requests and buffers
Related show

Commit Message

Barnabás Pőcze June 29, 2026, 4:29 p.m. UTC
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 <barnabas.pocze@ideasonboard.com>
---
 include/libcamera/internal/request.h |  2 --
 src/libcamera/request.cpp            | 10 ++--------
 2 files changed, 2 insertions(+), 10 deletions(-)

Patch
diff mbox series

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<Request>();
 	ASSERT(request->status() == RequestPending);
 
-	doCancelRequest();
+	cancelled_ = true;
+	pending_ = 0;
 }
 
 /**