From patchwork Mon Mar 29 09:15:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11762 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 58459C32EA for ; Mon, 29 Mar 2021 09:16:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1217A6878B; Mon, 29 Mar 2021 11:16:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="edWZ2U0F"; dkim-atps=neutral Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 46BD86877F for ; Mon, 29 Mar 2021 11:16:01 +0200 (CEST) Received: by mail-pj1-x102b.google.com with SMTP id s21so5711174pjq.1 for ; Mon, 29 Mar 2021 02:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ftjJzwNrmvPJW7qbqGOAURJROo1hW/N8tjWhheZFH0M=; b=edWZ2U0F6DwA+a3IAKsKXVBs7j4jglXYNDAuh5lDLI2KCDCONnAvRlBLDcCjqHz6Ds T9gbUEVNWVl36Cd1hoGTFNnnfnKBm9ao++ejx8Kqhtzc7Z4BkrD2cR3JcljVZGUtNeuw 4/ADsnqxpdbMCoJeLaiV2EBoIli1AYPVmpoxA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ftjJzwNrmvPJW7qbqGOAURJROo1hW/N8tjWhheZFH0M=; b=mZZH5Nnpsz4HfDnX/1SBIvbfPbRrP1RaInzSAuyGxRCXEsaFAziuSPeK+i1C84G6Ro IDTQz5siHUX2/n93vWNMVlNjbq354N7vdbmy0iLV87XrpPG5RitEi+jDguAHafK1L4Yq Nr5Q1fdRICQPbWlu9JhPUkB6s5YIPSf9ScNROtL5EbrBWgYa5atYiv6M/Pzi19V15jCG wg3sI1LTmUIBiHCo8Fd9m/nVNKxnETdUp+SPiHW6R9b15eFtlYr575d7DYjWH6G0z9nA fxQfaZb0+uw5hUOsR42ADGE2P7FnGJKKlqNBTatNmXzx7s4WqYRp7wtRCSY1qYZ+UaJC zCmg== X-Gm-Message-State: AOAM531reyUEOin1zbdxNgQQ9AAa2ALN3i19IltPIzN+l3k5Thg7rpxi 0RuHgb6UxjTRZx/FhRnqpmt7wE9donMhEQ== X-Google-Smtp-Source: ABdhPJyGON3ZsOpr2Dej7+kPYU4Qw1qV1QGgRm6ENJKV628onx+D97OecieooYxgYzqIPVvGaXzKZg== X-Received: by 2002:a17:902:e546:b029:e5:ec5e:6bf4 with SMTP id n6-20020a170902e546b02900e5ec5e6bf4mr27475880plf.41.1617009359807; Mon, 29 Mar 2021 02:15:59 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:1db7:ae60:9288:b906]) by smtp.gmail.com with ESMTPSA id n2sm15818122pga.57.2021.03.29.02.15.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 02:15:59 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Mon, 29 Mar 2021 18:15:50 +0900 Message-Id: <20210329091552.157208-2-hiroh@chromium.org> X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog In-Reply-To: <20210329091552.157208-1-hiroh@chromium.org> References: <20210329091552.157208-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/3] libcamera: PipelineHandler: Make queueRequest() void function 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" PipelineHandler::queueRequest() is asynchronously invoked in Camera::queueRequest(). Therefore the return value of PipelineHandler::queueRequest() is useless. This changes the function to a void function. Signed-off-by: Hirokazu Honda Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- include/libcamera/internal/pipeline_handler.h | 2 +- src/libcamera/camera.cpp | 6 ++++-- src/libcamera/pipeline_handler.cpp | 6 +----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h index 6aca0b46..093b94c6 100644 --- a/include/libcamera/internal/pipeline_handler.h +++ b/include/libcamera/internal/pipeline_handler.h @@ -79,7 +79,7 @@ public: virtual int start(Camera *camera, const ControlList *controls) = 0; virtual void stop(Camera *camera) = 0; - int queueRequest(Request *request); + void queueRequest(Request *request); bool completeBuffer(Request *request, FrameBuffer *buffer); void completeRequest(Request *request); diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 84edbb8f..2611c701 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -996,8 +996,10 @@ int Camera::queueRequest(Request *request) } } - return d->pipe_->invokeMethod(&PipelineHandler::queueRequest, - ConnectionTypeQueued, request); + d->pipe_->invokeMethod(&PipelineHandler::queueRequest, + ConnectionTypeQueued, request); + + return 0; } /** diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp index d22991d3..eba00ed3 100644 --- a/src/libcamera/pipeline_handler.cpp +++ b/src/libcamera/pipeline_handler.cpp @@ -371,10 +371,8 @@ const ControlList &PipelineHandler::properties(const Camera *camera) const * signalled by the pipeline handler using the completeRequest() method. * * \context This function is called from the CameraManager thread. - * - * \return 0 on success or a negative error code otherwise */ -int PipelineHandler::queueRequest(Request *request) +void PipelineHandler::queueRequest(Request *request) { LIBCAMERA_TRACEPOINT(request_queue, request); @@ -385,8 +383,6 @@ int PipelineHandler::queueRequest(Request *request) int ret = queueRequestDevice(camera, request); if (ret) data->queuedRequests_.remove(request); - - return ret; } /**