Show a patch.

GET /api/patches/26867/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 26867,
    "url": "https://patchwork.libcamera.org/api/patches/26867/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26867/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "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-3-laurent.pinchart@ideasonboard.com>",
    "date": "2026-06-11T01:17:18",
    "name": "[2/6] libcamera: matrix: Rename data validation function",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "4b70f8f500624a337bf7386b274dda72e36adc1b",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/26867/mbox/",
    "series": [
        {
            "id": 5986,
            "url": "https://patchwork.libcamera.org/api/series/5986/?format=api",
            "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/26867/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26867/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 369FFC328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Jun 2026 01:17:30 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D419361F31;\n\tThu, 11 Jun 2026 03:17:29 +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 766EA6139A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Jun 2026 03:17:26 +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 EC60BD0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Jun 2026 03:16:56 +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=\"uQlEIb8t\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1781140617;\n\tbh=b/HA4Q0OBzOwZzIXAztr6MofyzZ68ebScap0wcHWEN8=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=uQlEIb8tn1rp6jQtkLFqAEQnbze2BKHWWXu5z+SKAa14AKtBVl9GoGT1WPKsLJumk\n\tuyWrB8RJSM4nHdIuzTJhcmgQmd2sZJXrqgEI7lTd+Wg1KiwvOzgP+4eGVoFDUMXWOy\n\tap1UnV8eHg7ord77xT0btdfEsSgJD3VtfRh4z6og=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH 2/6] libcamera: matrix: Rename data validation function",
        "Date": "Thu, 11 Jun 2026 04:17:18 +0300",
        "Message-ID": "<20260611011722.1767689-3-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 matrixValidateYaml() 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\nmatrixValidateValueNode() 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/matrix.h | 6 ++----\n src/libcamera/matrix.cpp            | 2 +-\n 2 files changed, 3 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/matrix.h b/include/libcamera/internal/matrix.h\nindex 0f72263f2536..137eb65e0c52 100644\n--- a/include/libcamera/internal/matrix.h\n+++ b/include/libcamera/internal/matrix.h\n@@ -188,10 +188,8 @@ constexpr Matrix<T, Rows, Cols> operator+(const Matrix<T, Rows, Cols> &m1, const\n }\n \n #ifndef __DOXYGEN__\n-bool matrixValidateYaml(const ValueNode &obj, unsigned int size);\n-#endif /* __DOXYGEN__ */\n+bool matrixValidateValueNode(const ValueNode &obj, unsigned int size);\n \n-#ifndef __DOXYGEN__\n template<typename T, unsigned int Rows, unsigned int Cols>\n std::ostream &operator<<(std::ostream &out, const Matrix<T, Rows, Cols> &m)\n {\n@@ -203,7 +201,7 @@ template<typename T, unsigned int Rows, unsigned int Cols>\n struct ValueNode::Accessor<Matrix<T, Rows, Cols>> {\n \tstd::optional<Matrix<T, Rows, Cols>> get(const ValueNode &obj) const\n \t{\n-\t\tif (!matrixValidateYaml(obj, Rows * Cols))\n+\t\tif (!matrixValidateValueNode(obj, Rows * Cols))\n \t\t\treturn std::nullopt;\n \n \t\tMatrix<T, Rows, Cols> matrix;\ndiff --git a/src/libcamera/matrix.cpp b/src/libcamera/matrix.cpp\nindex 4fe210830421..e4fb8d35314d 100644\n--- a/src/libcamera/matrix.cpp\n+++ b/src/libcamera/matrix.cpp\n@@ -314,7 +314,7 @@ template bool matrixInvert<double>(Span<const double> data, Span<double> dataOut\n  * to the product of the number of rows and columns of the matrix (Rows x\n  * Cols). The values shall be stored in row-major order.\n  */\n-bool matrixValidateYaml(const ValueNode &obj, unsigned int size)\n+bool matrixValidateValueNode(const ValueNode &obj, unsigned int size)\n {\n \tif (!obj.isList())\n \t\treturn false;\n",
    "prefixes": [
        "2/6"
    ]
}