Patch Detail
Show a patch.
GET /api/patches/25561/?format=api
{ "id": 25561, "url": "https://patchwork.libcamera.org/api/patches/25561/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25561/", "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": "<20251215-v4l2-params-v7-1-be2b8c75ad09@ideasonboard.com>", "date": "2025-12-15T15:11:21", "name": "[v7,1/5] include: linux: Add stddef.h", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "3c88d75c878059bfb5155c240820ea4677b16b9b", "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/25561/mbox/", "series": [ { "id": 5665, "url": "https://patchwork.libcamera.org/api/series/5665/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5665", "date": "2025-12-15T15:11:20", "name": "ipa: libipa: Introduce V4L2Params", "version": 7, "mbox": "https://patchwork.libcamera.org/series/5665/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25561/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25561/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 20778C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 15 Dec 2025 15:11:44 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0B510619EB;\n\tMon, 15 Dec 2025 16:11:42 +0100 (CET)", "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 0308E615B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Dec 2025 16:11:39 +0100 (CET)", "from [192.168.0.172] (mob-5-90-49-39.net.vodafone.it [5.90.49.39])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CDAD4C6F;\n\tMon, 15 Dec 2025 16:11:32 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"MOtdKtdE\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1765811493;\n\tbh=m3or9HIkWJobjJdq2zdmxOw+i/OpN5p1+9z80dhX+DQ=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=MOtdKtdEzudioupXC7JQBFJEenCXuHP3Hy5dETRvPnTR11IfvWtPhRme1GwaVLUl5\n\tpG9u7g08+0GMiOKUut/EsIgTB4Gu9q+WdPC/oNgQzBTJbwikJTcvufnW1Wkl2UWnHq\n\tgW0rb9PYZXwzM8Nzy/QhTFPYF/p3ZkOFBGa1Rx1Q=", "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Date": "Mon, 15 Dec 2025 16:11:21 +0100", "Subject": "[PATCH v7 1/5] include: linux: Add stddef.h", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20251215-v4l2-params-v7-1-be2b8c75ad09@ideasonboard.com>", "References": "<20251215-v4l2-params-v7-0-be2b8c75ad09@ideasonboard.com>", "In-Reply-To": "<20251215-v4l2-params-v7-0-be2b8c75ad09@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=3730;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=m3or9HIkWJobjJdq2zdmxOw+i/OpN5p1+9z80dhX+DQ=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBpQCUn3Q0CxREFQNxWByabrrQYoeCGyd+aVbOi6\n\tGT9lTKWCkCJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaUAlJwAKCRByNAaPFqFW\n\tPPrFD/9PKqBmvoS7WHM1VCGptbuMl2EZ7y+SELaLufpp5+/WgcXDLEw5nwu8+9sxltC9/dM5b1E\n\trx5JZX903YJMIvJsKqv/S1K5kTAvBAO24Wg0Di3PHL9ebQGBhKp9HFO+xbDBpbWlY5xxU9iVLlV\n\ttsgkGwIEPeMgpKez3euxAnl3xMAYiY2jrSByNv5D3LM2xGXQyJznK3803Y+iXoFZ/yI+XmivwRI\n\tVsz7ZO3k3B1DRXxle3IDrCaHlS8uLm6ZCHJmsXLfA9q2lMA2ffTjnSAVtXrQcDof2L9xRYZJVbN\n\t/jktImcM20Wnmrbky79gVt8VcKrSR+EHLpy0FY96Jcyez+t1xzAPWV+5Yfm5mzeoOlHhqk8SVHs\n\tRHDqw5jL48OyI6sncKSFYGIGVJZuuPk5SxbJJ/Xa50RgJU9q5tpXDzuQMWIVAmsrHevwNjnQZhp\n\tuSDRzRzvcyN55ZJ25sYU9t5M5WA8A8cjeKvNvAydZzE5+TdmYlbQVjIJ4RVNfmeo66wYDTh8+Zm\n\tZvzSTPZEwE6mRNbP5nb1wDqkx09IZFT1TLzYHMPd6/XSniv0XaBPmMzGwIJ7le6djHZf60BzVco\n\tsmBpDtiHPas27V0QlHzkeRbVKIifiHCz//n0gaLXK1fwI/V5i3mJUp85WG3Yy4gv9E8QP3KQYSS\n\t17HldJ/MyUl9ryg==", "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.19-rc1 at revision\nc2a756891bb4 (\"uapi: wrap compiler_types.h in an ifdef instead of the\nimplicit strip\")\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 | 74 ++++++++++++++++++++++++++++++++++++++++++\n utils/update-kernel-headers.sh | 1 +\n 2 files changed, 75 insertions(+)", "diff": "diff --git a/include/linux/stddef.h b/include/linux/stddef.h\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..48ee4438e0ef053680c64af21553e8180ce5fdee\n--- /dev/null\n+++ b/include/linux/stddef.h\n@@ -0,0 +1,74 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+#ifndef _LINUX_STDDEF_H\n+#define _LINUX_STDDEF_H\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 f298a2aeaea7063a655554178f4086ca8ae658ac..3d402de24b207b3b7b181f8b7335965a2f74cff4 100755\n--- a/utils/update-kernel-headers.sh\n+++ b/utils/update-kernel-headers.sh\n@@ -53,6 +53,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": [ "v7", "1/5" ] }