{"id":26868,"url":"https://patchwork.libcamera.org/api/1.1/patches/26868/?format=json","web_url":"https://patchwork.libcamera.org/patch/26868/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260611011722.1767689-4-laurent.pinchart@ideasonboard.com>","date":"2026-06-11T01:17:19","name":"[3/6] libcamera: vector: Rename data validation function","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"88a47a328eb29238f8f427c7d3a4fd1920ac44e2","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/26868/mbox/","series":[{"id":5986,"url":"https://patchwork.libcamera.org/api/1.1/series/5986/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5986","date":"2026-06-11T01:17:16","name":"libcamera: Drop legacy mentions of YAML","version":1,"mbox":"https://patchwork.libcamera.org/series/5986/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/26868/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/26868/checks/","tags":{},"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 5749FC3300\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Jun 2026 01:17:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7507061F3F;\n\tThu, 11 Jun 2026 03:17:30 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D51E461F14\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Jun 2026 03:17:27 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 48614D0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Jun 2026 03:16:58 +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=\"EJaP9xDK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1781140618;\n\tbh=YCTHG3GTJm2Qci50lhIR0VnNuFkZFM+BHtyjUP5RWFQ=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=EJaP9xDKUc+9BdFuZR+45O5YJIfr3XwwEk1D4s4QGhF4R93F6wGNPzAezYq1ANd0n\n\tLnEJP0iXPvGWQEItvmWT8Gu7DrSFwz0H0rCY9jRB6T94zrPlQ0A2sqU1cS+Ljk2Nj6\n\tZlODSZzxcjnB+470Pea8YMrZYIkRkuZkXUI38FLk=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[PATCH 3/6] libcamera: vector: Rename data validation function","Date":"Thu, 11 Jun 2026 04:17:19 +0300","Message-ID":"<20260611011722.1767689-4-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260611011722.1767689-1-laurent.pinchart@ideasonboard.com>","References":"<20260611011722.1767689-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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>"},"content":"The vectorValidateYaml() function predates the refactoring of YamlObject\nand its rename to ValueNode. It now operates on a ValudeNode,\ndisconnected from the YAML parser. Rename it to\nvectorValidateValueNode() accordingly.\n\nWhile at it, fold consecutive __DOXYGEN__ conditional blocks into a\nsingle one.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/internal/vector.h | 6 ++----\n src/libcamera/vector.cpp            | 2 +-\n 2 files changed, 3 insertions(+), 5 deletions(-)","diff":"diff --git a/include/libcamera/internal/vector.h b/include/libcamera/internal/vector.h\nindex e3ea723d300c..093efafa8982 100644\n--- a/include/libcamera/internal/vector.h\n+++ b/include/libcamera/internal/vector.h\n@@ -343,10 +343,8 @@ bool operator!=(const Vector<T, Rows> &lhs, const Vector<T, Rows> &rhs)\n }\n \n #ifndef __DOXYGEN__\n-bool vectorValidateYaml(const ValueNode &obj, unsigned int size);\n-#endif /* __DOXYGEN__ */\n+bool vectorValidateValueNode(const ValueNode &obj, unsigned int size);\n \n-#ifndef __DOXYGEN__\n template<typename T, unsigned int Rows>\n std::ostream &operator<<(std::ostream &out, const Vector<T, Rows> &v)\n {\n@@ -364,7 +362,7 @@ template<typename T, unsigned int Rows>\n struct ValueNode::Accessor<Vector<T, Rows>> {\n \tstd::optional<Vector<T, Rows>> get(const ValueNode &obj) const\n \t{\n-\t\tif (!vectorValidateYaml(obj, Rows))\n+\t\tif (!vectorValidateValueNode(obj, Rows))\n \t\t\treturn std::nullopt;\n \n \t\tVector<T, Rows> vector;\ndiff --git a/src/libcamera/vector.cpp b/src/libcamera/vector.cpp\nindex 94fbf61e23ea..d850a581e32b 100644\n--- a/src/libcamera/vector.cpp\n+++ b/src/libcamera/vector.cpp\n@@ -351,7 +351,7 @@ LOG_DEFINE_CATEGORY(Vector)\n  */\n \n #ifndef __DOXYGEN__\n-bool vectorValidateYaml(const ValueNode &obj, unsigned int size)\n+bool vectorValidateValueNode(const ValueNode &obj, unsigned int size)\n {\n \tif (!obj.isList())\n \t\treturn false;\n","prefixes":["3/6"]}