Show a patch.

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

{
    "id": 23075,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23075/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23075/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20250331144352.736700-3-stefan.klug@ideasonboard.com>",
    "date": "2025-03-31T14:43:41",
    "name": "[2/9] utils: gen-debug-controls: Fix handling of controls that appear multiple times",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "e3da65fc673fa8615549172f1b95ae34b02ba142",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23075/mbox/",
    "series": [
        {
            "id": 5094,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5094/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5094",
            "date": "2025-03-31T14:43:39",
            "name": "Wdr preparations",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5094/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23075/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23075/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 98000C3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 31 Mar 2025 14:44:05 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 575A76898C;\n\tMon, 31 Mar 2025 16:44:05 +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 4322C68981\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 31 Mar 2025 16:44:02 +0200 (CEST)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:823a:c275:e8b5:b937])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B51CE82A;\n\tMon, 31 Mar 2025 16:42:10 +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=\"mJjiwPY0\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1743432130;\n\tbh=ihMdl61NblpxkOEVNCL7hSL+1CAfI8gcw5SWMv9DBds=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=mJjiwPY0Y6DLqIhycSIjtfsN5kNjvNS3n7fGRNp3v/1N+IOrXOGRltM1GsudvZO2Z\n\tFYV4zQYQG6pTZinrbTzOSitvd/NN7HkUKPyJrC5Qr4chie4/03tfBY27M0bT7QxMBq\n\tVm9Cis5TyQjjj4o5H226Ih5Dbx+2IDcPODub9mic=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "Subject": "[PATCH 2/9] utils: gen-debug-controls: Fix handling of controls that\n\tappear multiple times",
        "Date": "Mon, 31 Mar 2025 16:43:41 +0200",
        "Message-ID": "<20250331144352.736700-3-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20250331144352.736700-1-stefan.klug@ideasonboard.com>",
        "References": "<20250331144352.736700-1-stefan.klug@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": "Allow usage of the same debug control in multiple places as long as all\ninstances are of the same type and size.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n utils/gen-debug-controls.py | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/utils/gen-debug-controls.py b/utils/gen-debug-controls.py\nindex 53c8fa70d76d..ff22b986475e 100755\n--- a/utils/gen-debug-controls.py\n+++ b/utils/gen-debug-controls.py\n@@ -96,6 +96,7 @@ def main(argv):\n             controls_map[k] = v\n \n     obsolete_names = list(controls_map.keys())\n+    found_by_name = {}\n \n     for m in matches:\n         if not m.type:\n@@ -111,6 +112,12 @@ def main(argv):\n         if m.size is not None:\n             desc['size'] = m.size\n \n+        c = found_by_name.setdefault(m.name, m)\n+        if c.type != m.type or c.size != m.size:\n+            logger.error(\n+                f\"Found multiple entries for control '{m.name}' with differing type or size\")\n+            return 1\n+\n         if m.name in controls_map:\n             # Can't use == for modified check because of the special yaml dicts.\n             update_needed = False\n@@ -127,7 +134,9 @@ def main(argv):\n                 controls_map[m.name].clear()\n                 controls_map[m.name].update(desc)\n \n-            obsolete_names.remove(m.name)\n+            # Don't try to remove more than once in case control was found in multiple files.\n+            if m.name in obsolete_names:\n+                obsolete_names.remove(m.name)\n         else:\n             logger.info(f\"Add control '{m.name}'\")\n             insert_before = len(controls)\n",
    "prefixes": [
        "2/9"
    ]
}