Show a patch.

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

{
    "id": 24630,
    "url": "https://patchwork.libcamera.org/api/patches/24630/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/24630/",
    "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": "<20251014-v4l2-params-v6-1-caf5fa69eb29@ideasonboard.com>",
    "date": "2025-10-14T10:55:36",
    "name": "[v6,1/5] include: linux: Add stddef.h",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "2ae3e1d83c2d1a8f08baf0c40178799a1d67d550",
    "submitter": {
        "id": 143,
        "url": "https://patchwork.libcamera.org/api/people/143/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo.mondi@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/24630/mbox/",
    "series": [
        {
            "id": 5499,
            "url": "https://patchwork.libcamera.org/api/series/5499/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5499",
            "date": "2025-10-14T10:55:35",
            "name": "ipa: libipa: Introduce V4L2Params",
            "version": 6,
            "mbox": "https://patchwork.libcamera.org/series/5499/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/24630/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/24630/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 62AA6BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 14 Oct 2025 10:55:55 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EC1E3605E6;\n\tTue, 14 Oct 2025 12:55:54 +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 2DD9D60443\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Oct 2025 12:55:52 +0200 (CEST)",
            "from [192.168.1.182] (93-46-82-201.ip106.fastwebnet.it\n\t[93.46.82.201])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 55DFFC73;\n\tTue, 14 Oct 2025 12:54:12 +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=\"PQxiWg41\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760439252;\n\tbh=RlVztrqRILKiKyxjM9/uvbIg23F7JW+C2iycRA3ftjo=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=PQxiWg41nM4tmlOA9m2AglEaktI5vUKTn3RfFKiM11j0PIsdNsgnEBNLcYrHczqyQ\n\tDdjlbvrFYg04SeuQfWMTLTDdDGUQG191NCo7jmmUVd9paYpe1j3XnrIAcrUvjnvq/u\n\tgSL2f4cPTivRliT0/ZDWezwN7L9xqUmsRPmDX/og=",
        "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Date": "Tue, 14 Oct 2025 12:55:36 +0200",
        "Subject": "[PATCH v6 1/5] include: linux: Add stddef.h",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20251014-v4l2-params-v6-1-caf5fa69eb29@ideasonboard.com>",
        "References": "<20251014-v4l2-params-v6-0-caf5fa69eb29@ideasonboard.com>",
        "In-Reply-To": "<20251014-v4l2-params-v6-0-caf5fa69eb29@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>, \n\tKieran Bingham <kieran.bingham@ideasonboard.com>",
        "X-Mailer": "b4 0.14.2",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=3703;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=RlVztrqRILKiKyxjM9/uvbIg23F7JW+C2iycRA3ftjo=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBo7iw1f/vfnYgsvQVGkLNa8d/FQRGDrrKbiwifN\n\txmZQAGbR6+JAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaO4sNQAKCRByNAaPFqFW\n\tPCbAD/9paJO5DyrNBXj1bUCmAuWuyS1fiNyrZMYIuZsuRK8iAVXjdO3sQ2Vz9kgIz4X8yl5p03k\n\tZ7zsPLNlCJ2FmST7I3B1MthslG+OIpWN8X/33zTEe6Y1lEFK+kBKv1HIuL1TkIONlNFTN0UfYa2\n\tabFHWgNWGfvxbY+bGAs2bsfCojSARjZImwYTaIWqkd4taipToDyBl4X49Q4mnb8a5bmBuYMTjB1\n\tezNMCS/zReYbD8I47ufd4vrcLJo0OLr4PIRH4ph/1c6InKwS4OUhgjT3FrXkBIetUEnXrT01r2C\n\t2fLrvRc4U+nEo2N6EJ9aIDcb30idfLPVWY6k/vQL/qTY3ayF5nYrfsT/5Q1dxNwEjL+Tsgddgfi\n\tKZieLH22Wv7rKngrmiLVCX4WoSwp/Bqg9lRLhyYbrI1KWvgVb7o8zRVHr2CzfWuNXtxzQozAQOA\n\tdxKYB4I8CAYmlrE+h3pN7VEVFSoegMiV+FzP7pEFzwmPmjvuszD748mQiIdZ38/d5sLHmVA9Rdb\n\tPpTr0wU589keNkAn1hu3oF4kzrfbtvzPIGv/wFH1molj6J/i6p7gQnNRU9s/xUtsXaxzvPqy03g\n\tU1CV8aUVEgpiyCzv7BHH2ZGavXUMHv0PvnhkybCA2v2BLVRArPWwVHq/8/ZE518iK5Kjz1b+s3v\n\t6AnkzlyJso41Dog==",
        "X-Developer-Key": "i=jacopo.mondi@ideasonboard.com; a=openpgp;\n\tfpr=72392EDC88144A65C701EA9BA5826A2587AD026B",
        "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": "Import stddef.h from the Linux kernel sources v6.17 at revision\n3407caa69a06 (\"uapi: stddef.h: Introduce __kernel_nonstring\")\n\nThe stddef.h header is imported to provide the __counted_by() symbol\nwhich is not available in the header version shipped with, in example,\nDebian 12.  __counted_by() will be used by the v4l2-isp.h header which\nwill be imported next.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/linux/stddef.h         | 75 ++++++++++++++++++++++++++++++++++++++++++\n utils/update-kernel-headers.sh |  1 +\n 2 files changed, 76 insertions(+)",
    "diff": "diff --git a/include/linux/stddef.h b/include/linux/stddef.h\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..e1fcfcf3b33261939797d79f4e29a28fa1da6e10\n--- /dev/null\n+++ b/include/linux/stddef.h\n@@ -0,0 +1,75 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+#ifndef _LINUX_STDDEF_H\n+#define _LINUX_STDDEF_H\n+\n+\n+\n+#ifndef __always_inline\n+#define __always_inline __inline__\n+#endif\n+\n+/* Not all C++ standards support type declarations inside an anonymous union */\n+#ifndef __cplusplus\n+#define __struct_group_tag(TAG)\t\tTAG\n+#else\n+#define __struct_group_tag(TAG)\n+#endif\n+\n+/**\n+ * __struct_group() - Create a mirrored named and anonyomous struct\n+ *\n+ * @TAG: The tag name for the named sub-struct (usually empty)\n+ * @NAME: The identifier name of the mirrored sub-struct\n+ * @ATTRS: Any struct attributes (usually empty)\n+ * @MEMBERS: The member declarations for the mirrored structs\n+ *\n+ * Used to create an anonymous union of two structs with identical layout\n+ * and size: one anonymous and one named. The former's members can be used\n+ * normally without sub-struct naming, and the latter can be used to\n+ * reason about the start, end, and size of the group of struct members.\n+ * The named struct can also be explicitly tagged for layer reuse (C only),\n+ * as well as both having struct attributes appended.\n+ */\n+#define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \\\n+\tunion { \\\n+\t\tstruct { MEMBERS } ATTRS; \\\n+\t\tstruct __struct_group_tag(TAG) { MEMBERS } ATTRS NAME; \\\n+\t} ATTRS\n+\n+#ifdef __cplusplus\n+/* sizeof(struct{}) is 1 in C++, not 0, can't use C version of the macro. */\n+#define __DECLARE_FLEX_ARRAY(T, member)\t\\\n+\tT member[0]\n+#else\n+/**\n+ * __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union\n+ *\n+ * @TYPE: The type of each flexible array element\n+ * @NAME: The name of the flexible array member\n+ *\n+ * In order to have a flexible array member in a union or alone in a\n+ * struct, it needs to be wrapped in an anonymous struct with at least 1\n+ * named member, but that member can be empty.\n+ */\n+#define __DECLARE_FLEX_ARRAY(TYPE, NAME)\t\\\n+\tstruct { \\\n+\t\tstruct { } __empty_ ## NAME; \\\n+\t\tTYPE NAME[]; \\\n+\t}\n+#endif\n+\n+#ifndef __counted_by\n+#define __counted_by(m)\n+#endif\n+\n+#ifndef __counted_by_le\n+#define __counted_by_le(m)\n+#endif\n+\n+#ifndef __counted_by_be\n+#define __counted_by_be(m)\n+#endif\n+\n+#define __kernel_nonstring\n+\n+#endif /* _LINUX_STDDEF_H */\ndiff --git a/utils/update-kernel-headers.sh b/utils/update-kernel-headers.sh\nindex 9a64dfb5698c67945ab4eee085360c1728589401..666624f9972ea61067e5b5695237ab7a17c61664 100755\n--- a/utils/update-kernel-headers.sh\n+++ b/utils/update-kernel-headers.sh\n@@ -52,6 +52,7 @@ headers=\"\n \tlinux/media-bus-format.h\n \tlinux/media.h\n \tlinux/rkisp1-config.h\n+\tlinux/stddef.h\n \tlinux/udmabuf.h\n \tlinux/v4l2-common.h\n \tlinux/v4l2-controls.h\n",
    "prefixes": [
        "v6",
        "1/5"
    ]
}