[{"id":13223,"web_url":"https://patchwork.libcamera.org/comment/13223/","msgid":"<20201015232053.gg5cemy7x7m2wkgd@oden.dyn.berto.se>","date":"2020-10-15T23:20:53","subject":"Re: [libcamera-devel] [PATCH v2 05/11] libcamera: pipeline: Use\n\texisting variable definitions","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Kieran,\n\nOn 2020-10-15 23:37:44 +0100, Kieran Bingham wrote:\n> Prevent variable aliasing by removing the redeclaration of variables\n> with the same name (and type) where the existing variable can be reused.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-\n>  src/libcamera/pipeline/simple/simple.cpp           | 4 ++--\n>  2 files changed, 3 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 85e0a1f26ab6..2d70d984a276 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -1008,7 +1008,7 @@ int PipelineHandlerRPi::queueAllBuffers(Camera *camera)\n>  \t\t\t */\n>  \t\t\tunsigned int i;\n>  \t\t\tfor (i = 0; i < data->dropFrameCount_; i++) {\n> -\t\t\t\tint ret = stream->queueBuffer(nullptr);\n> +\t\t\t\tret = stream->queueBuffer(nullptr);\n>  \t\t\t\tif (ret)\n>  \t\t\t\t\treturn ret;\n>  \t\t\t}\n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 999c44515023..33daa2fb1b7b 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -612,8 +612,8 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>  \tuseConverter_ = config->needConversion();\n>  \n>  \tif (useConverter_) {\n> -\t\tint ret = converter_->configure(pipeConfig.pixelFormat,\n> -\t\t\t\t\t\tpipeConfig.captureSize, &cfg);\n> +\t\tret = converter_->configure(pipeConfig.pixelFormat,\n> +\t\t\t\t\t    pipeConfig.captureSize, &cfg);\n>  \t\tif (ret < 0) {\n>  \t\t\tLOG(SimplePipeline, Error)\n>  \t\t\t\t<< \"Unable to configure converter\";\n> -- \n> 2.25.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id A7AFDBE174\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 15 Oct 2020 23:20:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 10C2F60F61;\n\tFri, 16 Oct 2020 01:20:57 +0200 (CEST)","from mail-lf1-x141.google.com (mail-lf1-x141.google.com\n\t[IPv6:2a00:1450:4864:20::141])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6884A60E36\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Oct 2020 01:20:56 +0200 (CEST)","by mail-lf1-x141.google.com with SMTP id r127so584099lff.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 15 Oct 2020 16:20:56 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tp1sm220272ljn.61.2020.10.15.16.20.54\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 15 Oct 2020 16:20:54 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"OfTuCnG9\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=+hhoAk4WpfFBSkcSeuz+ZZzsz+5tJBSTvFR2lfaeqas=;\n\tb=OfTuCnG9z4rynbQY91JoxcvfXCCx3fGc/gvFMORPGW1HjVi8hWvatZxuUUwM8lQ3DR\n\twU2fdhiz7ov5ejTEzRgcxwC0hsG6GgGJCyuFAzuaHbxjBmGkRES/t062cNkQKDUKYs0B\n\tn7Qyz7U+/6b8vJhXgGDQtWOgu4+MKOtxxrSdRxelJxjF7npxsteAL2TGnQg1/0bc9c+x\n\tzj0Oxuu1hqKwNwvh7ybGMifXmrb0jnW6HCC6aUkNSsnm3y04ZNwGuk0swK/aadHlw0hZ\n\tDqJuaqvqp3vLWJv4W6SKNla9JFMDu7opkagv2n/svbi5MQ0r9brHW3YZ2X/sUdQ2G2hq\n\tHlhw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=+hhoAk4WpfFBSkcSeuz+ZZzsz+5tJBSTvFR2lfaeqas=;\n\tb=cSPPmkF/EJm7gLLKBcQGMgarVxoK5t0l4BHea6d4XKgz+RJwAny0ACss+O85XXW2q6\n\tFKH4n5aSYjJQNF9PHjH8vPAeDIAtkAPFizDziAjYpd7oqxb0YwoZ+dJBUDPYpTdTFTr+\n\t1Km6IGvVY4XHOeudvtYrIY2WF8GGHxzIno8SCIWYk3VShVJ1YiBo/oJUzjJm+neDqlZN\n\tMs17Ka1MfSVM77bRFaARVxzF46Fpq/fKVU3pQp1pSVowzgtLJBejBNW4eAelhuODYC/7\n\tWqL4PqLTSTiJmDoMNERwT89kWM/p/8bXKxk8hXmv1h42ClZzfJg1cDwA79aYvK++vyQm\n\tes2g==","X-Gm-Message-State":"AOAM533AN5kBdCJwkv8g4LcsjH4QqY6/5YQWZHujqR9IC5C3GhQQ6yVl\n\t18EfL20TUkRCtI8/TCtpaSR+GA==","X-Google-Smtp-Source":"ABdhPJy3udki4q4rrL12bPx38dQrU8wapE2sp77wGXLszTRBab3WwJq+63wgTHzUm6NPvzIoatghJQ==","X-Received":"by 2002:a19:7608:: with SMTP id c8mr284010lff.453.1602804055466; \n\tThu, 15 Oct 2020 16:20:55 -0700 (PDT)","Date":"Fri, 16 Oct 2020 01:20:53 +0200","From":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20201015232053.gg5cemy7x7m2wkgd@oden.dyn.berto.se>","References":"<20201015223750.58563-1-kieran.bingham@ideasonboard.com>\n\t<20201015223750.58563-6-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201015223750.58563-6-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 05/11] libcamera: pipeline: Use\n\texisting variable definitions","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":13228,"web_url":"https://patchwork.libcamera.org/comment/13228/","msgid":"<20201016004253.GB3829@pendragon.ideasonboard.com>","date":"2020-10-16T00:42:53","subject":"Re: [libcamera-devel] [PATCH v2 05/11] libcamera: pipeline: Use\n\texisting variable definitions","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Thu, Oct 15, 2020 at 11:37:44PM +0100, Kieran Bingham wrote:\n> Prevent variable aliasing by removing the redeclaration of variables\n> with the same name (and type) where the existing variable can be reused.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-\n>  src/libcamera/pipeline/simple/simple.cpp           | 4 ++--\n>  2 files changed, 3 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 85e0a1f26ab6..2d70d984a276 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -1008,7 +1008,7 @@ int PipelineHandlerRPi::queueAllBuffers(Camera *camera)\n>  \t\t\t */\n>  \t\t\tunsigned int i;\n>  \t\t\tfor (i = 0; i < data->dropFrameCount_; i++) {\n> -\t\t\t\tint ret = stream->queueBuffer(nullptr);\n> +\t\t\t\tret = stream->queueBuffer(nullptr);\n>  \t\t\t\tif (ret)\n>  \t\t\t\t\treturn ret;\n>  \t\t\t}\n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 999c44515023..33daa2fb1b7b 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -612,8 +612,8 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>  \tuseConverter_ = config->needConversion();\n>  \n>  \tif (useConverter_) {\n> -\t\tint ret = converter_->configure(pipeConfig.pixelFormat,\n> -\t\t\t\t\t\tpipeConfig.captureSize, &cfg);\n> +\t\tret = converter_->configure(pipeConfig.pixelFormat,\n> +\t\t\t\t\t    pipeConfig.captureSize, &cfg);\n>  \t\tif (ret < 0) {\n>  \t\t\tLOG(SimplePipeline, Error)\n>  \t\t\t\t<< \"Unable to configure converter\";","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id F3B3DBE905\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 16 Oct 2020 00:43:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 823AA60F23;\n\tFri, 16 Oct 2020 02:43:41 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9C273600F2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Oct 2020 02:43:40 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 124DA556;\n\tFri, 16 Oct 2020 02:43:40 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ena6C8I7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1602809020;\n\tbh=tkfuScnmXegVJIRXh4i4kIun6GWk5jeTp+SLocCfu34=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ena6C8I7S1dBQGZlZyCWltA+uzV0Ykf4vM92zO9Z4PrQP6YJ/9lRi2iF3oOWNJCeZ\n\tL2GpQ6Gv8G0ioIdh2aUaoJiYQWi240XapltyVSK3FNOF821a9L1+Y3rSYFD+GAmQso\n\tWAhDgr7eZBLbX9do5dLvOdxF90lqC6pOlSVTuk/c=","Date":"Fri, 16 Oct 2020 03:42:53 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20201016004253.GB3829@pendragon.ideasonboard.com>","References":"<20201015223750.58563-1-kieran.bingham@ideasonboard.com>\n\t<20201015223750.58563-6-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201015223750.58563-6-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 05/11] libcamera: pipeline: Use\n\texisting variable definitions","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]