Show a patch.

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

{
    "id": 23367,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23367/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23367/",
    "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": "<20250515120012.3127231-3-barnabas.pocze@ideasonboard.com>",
    "date": "2025-05-15T12:00:06",
    "name": "[RFC,v1,2/8] utils: codegen: ipc: Remove `namespace` argument",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "8c52442fd5cc477ad3d997abc3ed01da5b055862",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/1.1/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23367/mbox/",
    "series": [
        {
            "id": 5173,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5173/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5173",
            "date": "2025-05-15T12:00:04",
            "name": "utils: codegen: ipc: Simplify deserialization",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5173/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23367/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23367/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 46615C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 15 May 2025 12:00:27 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 756D968C92;\n\tThu, 15 May 2025 14:00:23 +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 079F968B6E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 15 May 2025 14:00:17 +0200 (CEST)",
            "from pb-laptop.local (185.221.142.248.nat.pool.zt.hu\n\t[185.221.142.248])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DB8B0A57;\n\tThu, 15 May 2025 13:59:59 +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=\"oGmU38gT\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1747310400;\n\tbh=cFUUT4bWq0B7vLv+FUMXYm9V1puLnTfIqpnWJEO1PCc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=oGmU38gTcvrq8cCtWuoF5msJfjRg0NBjilJAZ3yBjn/Axx+qy1bSICEUsYNy+pAiu\n\tzlu/6DJf8DEX22D6J5+fAOZv9cODxgq+M3JKum/oCVPMmoR2lkEZKxBYGrSAQdU5/z\n\tGWaxwew13tBhoIHnHN3ZdOINenamjcgXVx0Wzjrw=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Paul Elder <paul.elder@ideasonboard.com>",
        "Subject": "[RFC PATCH v1 2/8] utils: codegen: ipc: Remove `namespace` argument",
        "Date": "Thu, 15 May 2025 14:00:06 +0200",
        "Message-ID": "<20250515120012.3127231-3-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<20250515120012.3127231-1-barnabas.pocze@ideasonboard.com>",
        "References": "<20250515120012.3127231-1-barnabas.pocze@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "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 `serializer()`, `deserializer_{fd,no_fd,simple}()` functions\ntake a string argument named \"namespace\", but they do not use it.\nSo remove the argument.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n .../core_ipa_serializer.h.tmpl                 |  8 ++++----\n .../module_ipa_serializer.h.tmpl               |  8 ++++----\n .../libcamera_templates/serializer.tmpl        | 18 +++++++++---------\n 3 files changed, 17 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/utils/codegen/ipc/generators/libcamera_templates/core_ipa_serializer.h.tmpl b/utils/codegen/ipc/generators/libcamera_templates/core_ipa_serializer.h.tmpl\nindex 036518f6c..cbb35ef51 100644\n--- a/utils/codegen/ipc/generators/libcamera_templates/core_ipa_serializer.h.tmpl\n+++ b/utils/codegen/ipc/generators/libcamera_templates/core_ipa_serializer.h.tmpl\n@@ -31,12 +31,12 @@ template<>\n class IPADataSerializer<{{struct|name}}>\n {\n public:\n-{{- serializer.serializer(struct, \"\")}}\n+{{- serializer.serializer(struct)}}\n {%- if struct|has_fd %}\n-{{serializer.deserializer_fd(struct, \"\")}}\n+{{serializer.deserializer_fd(struct)}}\n {%- else %}\n-{{serializer.deserializer_no_fd(struct, \"\")}}\n-{{serializer.deserializer_fd_simple(struct, \"\")}}\n+{{serializer.deserializer_no_fd(struct)}}\n+{{serializer.deserializer_fd_simple(struct)}}\n {%- endif %}\n };\n {% endfor %}\ndiff --git a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_serializer.h.tmpl b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_serializer.h.tmpl\nindex cd5a65a92..f3b8e3b15 100644\n--- a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_serializer.h.tmpl\n+++ b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_serializer.h.tmpl\n@@ -32,12 +32,12 @@ template<>\n class IPADataSerializer<{{struct|name_full}}>\n {\n public:\n-{{- serializer.serializer(struct, namespace_str)}}\n+{{- serializer.serializer(struct)}}\n {%- if struct|has_fd %}\n-{{serializer.deserializer_fd(struct, namespace_str)}}\n+{{serializer.deserializer_fd(struct)}}\n {%- else %}\n-{{serializer.deserializer_no_fd(struct, namespace_str)}}\n-{{serializer.deserializer_fd_simple(struct, namespace_str)}}\n+{{serializer.deserializer_no_fd(struct)}}\n+{{serializer.deserializer_fd_simple(struct)}}\n {%- endif %}\n };\n {% endfor %}\ndiff --git a/utils/codegen/ipc/generators/libcamera_templates/serializer.tmpl b/utils/codegen/ipc/generators/libcamera_templates/serializer.tmpl\nindex 323e12939..114e349c9 100644\n--- a/utils/codegen/ipc/generators/libcamera_templates/serializer.tmpl\n+++ b/utils/codegen/ipc/generators/libcamera_templates/serializer.tmpl\n@@ -28,7 +28,7 @@\n  #\n  # \\todo Avoid intermediate vectors\n  #}\n-{%- macro serializer_field(field, namespace, loop) %}\n+{%- macro serializer_field(field, loop) %}\n {%- if field|is_pod or field|is_enum %}\n \t\tstd::vector<uint8_t> {{field.mojom_name}};\n \t\tstd::tie({{field.mojom_name}}, std::ignore) =\n@@ -94,7 +94,7 @@\n  # Generate code to deserialize \\a field into object ret.\n  # This code is meant to be used by the IPADataSerializer specialization.\n  #}\n-{%- macro deserializer_field(field, namespace, loop) %}\n+{%- macro deserializer_field(field, loop) %}\n {% if field|is_pod or field|is_enum %}\n \t{%- set field_size = (field|bit_width|int / 8)|int %}\n \t\t{{- check_data_size(field_size, 'dataSize', field.mojom_name, 'data')}}\n@@ -182,7 +182,7 @@\n  # Generate code for IPADataSerializer specialization, for serializing\n  # \\a struct.\n  #}\n-{%- macro serializer(struct, namespace) %}\n+{%- macro serializer(struct) %}\n \tstatic std::tuple<std::vector<uint8_t>, std::vector<SharedFD>>\n \tserialize(const {{struct|name_full}} &data,\n {%- if struct|needs_control_serializer %}\n@@ -196,7 +196,7 @@\n \t\tstd::vector<SharedFD> retFds;\n {%- endif %}\n {%- for field in struct.fields %}\n-{{serializer_field(field, namespace, loop)}}\n+{{serializer_field(field, loop)}}\n {%- endfor %}\n {% if struct|has_fd %}\n \t\treturn {retData, retFds};\n@@ -213,7 +213,7 @@\n  # Generate code for IPADataSerializer specialization, for deserializing\n  # \\a struct, in the case that \\a struct has file descriptors.\n  #}\n-{%- macro deserializer_fd(struct, namespace) %}\n+{%- macro deserializer_fd(struct) %}\n \tstatic {{struct|name_full}}\n \tdeserialize(std::vector<uint8_t> &data,\n \t\t    std::vector<SharedFD> &fds,\n@@ -245,7 +245,7 @@\n \t\tsize_t dataSize = std::distance(dataBegin, dataEnd);\n \t\t[[maybe_unused]] size_t fdsSize = std::distance(fdsBegin, fdsEnd);\n {%- for field in struct.fields -%}\n-{{deserializer_field(field, namespace, loop)}}\n+{{deserializer_field(field, loop)}}\n {%- endfor %}\n \t\treturn ret;\n \t}\n@@ -258,7 +258,7 @@\n  # \\a struct, in the case that \\a struct has no file descriptors but requires\n  # deserializers with file descriptors.\n  #}\n-{%- macro deserializer_fd_simple(struct, namespace) %}\n+{%- macro deserializer_fd_simple(struct) %}\n \tstatic {{struct|name_full}}\n \tdeserialize(std::vector<uint8_t> &data,\n \t\t    [[maybe_unused]] std::vector<SharedFD> &fds,\n@@ -285,7 +285,7 @@\n  # Generate code for IPADataSerializer specialization, for deserializing\n  # \\a struct, in the case that \\a struct does not have file descriptors.\n  #}\n-{%- macro deserializer_no_fd(struct, namespace) %}\n+{%- macro deserializer_no_fd(struct) %}\n \tstatic {{struct|name_full}}\n \tdeserialize(std::vector<uint8_t> &data,\n {%- if struct|needs_control_serializer %}\n@@ -312,7 +312,7 @@\n \n \t\tsize_t dataSize = std::distance(dataBegin, dataEnd);\n {%- for field in struct.fields -%}\n-{{deserializer_field(field, namespace, loop)}}\n+{{deserializer_field(field, loop)}}\n {%- endfor %}\n \t\treturn ret;\n \t}\n",
    "prefixes": [
        "RFC",
        "v1",
        "2/8"
    ]
}