[{"id":30285,"web_url":"https://patchwork.libcamera.org/comment/30285/","msgid":"<438e0d2f-d594-4764-9325-adca28c80492@ideasonboard.com>","date":"2024-07-04T03:32:04","subject":"Re: [PATCH] ipa: rkisp1: blc: Drop [[maybe_unused]] attribute","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Laurent,\n\nThank you for the patch.\n\nOn 03/07/24 11:01 pm, Laurent Pinchart wrote:\n> The context parameter of the BlackLevelCorrection::init() function is\n> used. Drop the [[maybe_unused]] attribute.\n>\n> Fixes: 50c28e135100 (\"ipa: rkisp1: blc: Query black levels from camera sensor helper\")\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n> ---\n> I'm starting to wonder if we should omit parameter names for parameters\n> that are never used, and use [[maybe_unused]] for parameters that are\n> conditionally unused, as recommended by\n> https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-unused.\n\nack\n> ---\n>   src/ipa/rkisp1/algorithms/blc.cpp | 3 +--\n>   1 file changed, 1 insertion(+), 2 deletions(-)\n>\n> diff --git a/src/ipa/rkisp1/algorithms/blc.cpp b/src/ipa/rkisp1/algorithms/blc.cpp\n> index 4b00034cc434..464a0e066dd4 100644\n> --- a/src/ipa/rkisp1/algorithms/blc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/blc.cpp\n> @@ -52,8 +52,7 @@ BlackLevelCorrection::BlackLevelCorrection()\n>   /**\n>    * \\copydoc libcamera::ipa::Algorithm::init\n>    */\n> -int BlackLevelCorrection::init([[maybe_unused]] IPAContext &context,\n> -\t\t\t       const YamlObject &tuningData)\n> +int BlackLevelCorrection::init(IPAContext &context, const YamlObject &tuningData)\n>   {\n>   \tstd::optional<int16_t> levelRed = tuningData[\"R\"].get<int16_t>();\n>   \tstd::optional<int16_t> levelGreenR = tuningData[\"Gr\"].get<int16_t>();\n>\n> base-commit: 196abb8d1d6e0fe9d190315e72a85eb12d16a554","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 413C3BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Jul 2024 03:32:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0E82962E22;\n\tThu,  4 Jul 2024 05:32:12 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4910F619C3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Jul 2024 05:32:10 +0200 (CEST)","from [IPV6:2405:201:2015:f873:55d7:c02e:b2eb:ee3f] (unknown\n\t[IPv6:2405:201:2015:f873:55d7:c02e:b2eb:ee3f])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A6773541;\n\tThu,  4 Jul 2024 05:31:40 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ib6a/kjH\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1720063901;\n\tbh=gIMHtAB+AefQaRQz3LvQ5fUTgx7pVZtFcPBAaAXLx/k=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=ib6a/kjHOsmVtv5xsvQDeRPtyxzpsshhxV/pUMUxImnpGB08/hWCX0flc3M3dvEWq\n\tloTeFcRyHIDkVaZshpqk5giQfAeeIMLOMWI2MwUgpJBTTaY20HCILaMgZy/T1LgJiO\n\tr7hNWRlvb90rNhSocwuy9YOPrL6co3ayC1Bq7fKs=","Message-ID":"<438e0d2f-d594-4764-9325-adca28c80492@ideasonboard.com>","Date":"Thu, 4 Jul 2024 09:02:04 +0530","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] ipa: rkisp1: blc: Drop [[maybe_unused]] attribute","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","References":"<20240703173120.9995-1-laurent.pinchart@ideasonboard.com>","Content-Language":"en-US","From":"Umang Jain <umang.jain@ideasonboard.com>","In-Reply-To":"<20240703173120.9995-1-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":30288,"web_url":"https://patchwork.libcamera.org/comment/30288/","msgid":"<magnev3m3ir73lajpg7xss34uxoxn44hwbq4cuicqidfi5hpan@ckgdeqxw4wws>","date":"2024-07-04T07:36:50","subject":"Re: [PATCH] ipa: rkisp1: blc: Drop [[maybe_unused]] attribute","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi Laurent,\n\nThank you for the patch.\n\nOn Wed, Jul 03, 2024 at 08:31:20PM +0300, Laurent Pinchart wrote:\n> The context parameter of the BlackLevelCorrection::init() function is\n> used. Drop the [[maybe_unused]] attribute.\n> \n> Fixes: 50c28e135100 (\"ipa: rkisp1: blc: Query black levels from camera sensor helper\")\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nSorry, I should have checked that. Thanks for the fix.\n\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> \n\n> ---\n> I'm starting to wonder if we should omit parameter names for parameters\n> that are never used, and use [[maybe_unused]] for parameters that are\n> conditionally unused, as recommended by\n> https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-unused.\n\nThat would make it more obvious when we reintroduce a param and would\nremove most [[maybe_unused]]. Sounds great.\n\nBest regards,\nStefan\n\n> ---\n>  src/ipa/rkisp1/algorithms/blc.cpp | 3 +--\n>  1 file changed, 1 insertion(+), 2 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/blc.cpp b/src/ipa/rkisp1/algorithms/blc.cpp\n> index 4b00034cc434..464a0e066dd4 100644\n> --- a/src/ipa/rkisp1/algorithms/blc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/blc.cpp\n> @@ -52,8 +52,7 @@ BlackLevelCorrection::BlackLevelCorrection()\n>  /**\n>   * \\copydoc libcamera::ipa::Algorithm::init\n>   */\n> -int BlackLevelCorrection::init([[maybe_unused]] IPAContext &context,\n> -\t\t\t       const YamlObject &tuningData)\n> +int BlackLevelCorrection::init(IPAContext &context, const YamlObject &tuningData)\n>  {\n>  \tstd::optional<int16_t> levelRed = tuningData[\"R\"].get<int16_t>();\n>  \tstd::optional<int16_t> levelGreenR = tuningData[\"Gr\"].get<int16_t>();\n> \n> base-commit: 196abb8d1d6e0fe9d190315e72a85eb12d16a554\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","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 B0664BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Jul 2024 07:36:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5D53362E22;\n\tThu,  4 Jul 2024 09:36:55 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B65A9619C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Jul 2024 09:36:53 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:c01a:815:781:30fb])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DEABB3D6;\n\tThu,  4 Jul 2024 09:36:24 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"aUxrXsEQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1720078585;\n\tbh=nyPIgL6Lglzgb+IvnFcVOvDbcSkJaVdQCzkKOHlu3f8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=aUxrXsEQ8SO1TRSXN7gBvTA/qvfBKSPCfDPijdv6izSCxGW4UC0rub4SeBvH9+oCt\n\tsTtoocI1rtFYXBKSktCb/5xkOgo7J+1n6HoxUQuoiO9SO4wshNdIkiMju4/hgWqRgv\n\t2QkDlOqxHuSKlRiSLLqHpV2c4HH29JfjWucnEJd8=","Date":"Thu, 4 Jul 2024 09:36:50 +0200","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] ipa: rkisp1: blc: Drop [[maybe_unused]] attribute","Message-ID":"<magnev3m3ir73lajpg7xss34uxoxn44hwbq4cuicqidfi5hpan@ckgdeqxw4wws>","References":"<20240703173120.9995-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240703173120.9995-1-laurent.pinchart@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":30293,"web_url":"https://patchwork.libcamera.org/comment/30293/","msgid":"<ZoZjiE5GlKTByBEH@pyrite.rasen.tech>","date":"2024-07-04T08:55:36","subject":"Re: [PATCH] ipa: rkisp1: blc: Drop [[maybe_unused]] attribute","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Wed, Jul 03, 2024 at 08:31:20PM +0300, Laurent Pinchart wrote:\n> The context parameter of the BlackLevelCorrection::init() function is\n> used. Drop the [[maybe_unused]] attribute.\n> \n> Fixes: 50c28e135100 (\"ipa: rkisp1: blc: Query black levels from camera sensor helper\")\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n> I'm starting to wonder if we should omit parameter names for parameters\n> that are never used, and use [[maybe_unused]] for parameters that are\n> conditionally unused, as recommended by\n> https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-unused.\n> ---\n>  src/ipa/rkisp1/algorithms/blc.cpp | 3 +--\n>  1 file changed, 1 insertion(+), 2 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/blc.cpp b/src/ipa/rkisp1/algorithms/blc.cpp\n> index 4b00034cc434..464a0e066dd4 100644\n> --- a/src/ipa/rkisp1/algorithms/blc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/blc.cpp\n> @@ -52,8 +52,7 @@ BlackLevelCorrection::BlackLevelCorrection()\n>  /**\n>   * \\copydoc libcamera::ipa::Algorithm::init\n>   */\n> -int BlackLevelCorrection::init([[maybe_unused]] IPAContext &context,\n> -\t\t\t       const YamlObject &tuningData)\n> +int BlackLevelCorrection::init(IPAContext &context, const YamlObject &tuningData)\n>  {\n>  \tstd::optional<int16_t> levelRed = tuningData[\"R\"].get<int16_t>();\n>  \tstd::optional<int16_t> levelGreenR = tuningData[\"Gr\"].get<int16_t>();\n> \n> base-commit: 196abb8d1d6e0fe9d190315e72a85eb12d16a554","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 778BDBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Jul 2024 08:55:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 63EBB62E23;\n\tThu,  4 Jul 2024 10:55:45 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4C6B862C99\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Jul 2024 10:55:44 +0200 (CEST)","from pyrite.rasen.tech (h175-177-049-156.catv02.itscom.jp\n\t[175.177.49.156])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1F033541;\n\tThu,  4 Jul 2024 10:55:13 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"H0ujPBhd\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1720083315;\n\tbh=KIP35hJr2VNH8ogdonaV3iI+pz53fcbxs00Jb83x2lg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=H0ujPBhdlZHQ2KtDE/qHeGYCB8eBghc3cR/rhXV3NUbxabNdvYgSvTx++Gdswuzm0\n\tEgY0kvd1ZURbcnNyHjFD3LCOA34Mw4PqDdUvvXYNU+81WjEUvMhz1ozjNn7Y1yyeh3\n\tCD2k/hhnBH+eqE98A3PtkqegxeiBlE5FymoCi820=","Date":"Thu, 4 Jul 2024 17:55:36 +0900","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tStefan Klug <stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH] ipa: rkisp1: blc: Drop [[maybe_unused]] attribute","Message-ID":"<ZoZjiE5GlKTByBEH@pyrite.rasen.tech>","References":"<20240703173120.9995-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20240703173120.9995-1-laurent.pinchart@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]