[PATCH] ipa: rkisp1: blc: Drop [[maybe_unused]] attribute

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Jul 3 19:31:20 CEST 2024


The context parameter of the BlackLevelCorrection::init() function is
used. Drop the [[maybe_unused]] attribute.

Fixes: 50c28e135100 ("ipa: rkisp1: blc: Query black levels from camera sensor helper")
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
I'm starting to wonder if we should omit parameter names for parameters
that are never used, and use [[maybe_unused]] for parameters that are
conditionally unused, as recommended by
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-unused.
---
 src/ipa/rkisp1/algorithms/blc.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/ipa/rkisp1/algorithms/blc.cpp b/src/ipa/rkisp1/algorithms/blc.cpp
index 4b00034cc434..464a0e066dd4 100644
--- a/src/ipa/rkisp1/algorithms/blc.cpp
+++ b/src/ipa/rkisp1/algorithms/blc.cpp
@@ -52,8 +52,7 @@ BlackLevelCorrection::BlackLevelCorrection()
 /**
  * \copydoc libcamera::ipa::Algorithm::init
  */
-int BlackLevelCorrection::init([[maybe_unused]] IPAContext &context,
-			       const YamlObject &tuningData)
+int BlackLevelCorrection::init(IPAContext &context, const YamlObject &tuningData)
 {
 	std::optional<int16_t> levelRed = tuningData["R"].get<int16_t>();
 	std::optional<int16_t> levelGreenR = tuningData["Gr"].get<int16_t>();

base-commit: 196abb8d1d6e0fe9d190315e72a85eb12d16a554
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list