Patch Detail
Show a patch.
GET /api/1.1/patches/12099/?format=api
{ "id": 12099, "url": "https://patchwork.libcamera.org/api/1.1/patches/12099/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12099/", "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": "<20210423104711.401547-2-paul.elder@ideasonboard.com>", "date": "2021-04-23T10:47:09", "name": "[libcamera-devel,v3,1/3] utils: ipc: Include instead of forward-declare CameraSensorInfo", "commit_ref": "17e8f6f71c0a03bd011675f83e93912317527885", "pull_url": null, "state": "accepted", "archived": false, "hash": "aa48b5ccf0b5429a6430092facba657cb55d27c4", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/users/17/?format=api", "username": "epaul", "first_name": "Paul", "last_name": "Elder", "email": "paul.elder@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/12099/mbox/", "series": [ { "id": 1971, "url": "https://patchwork.libcamera.org/api/1.1/series/1971/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1971", "date": "2021-04-23T10:47:08", "name": "Fix support for core.mojom structs", "version": 3, "mbox": "https://patchwork.libcamera.org/series/1971/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12099/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12099/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 3F00ABDB15\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Apr 2021 10:47:25 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F052C6887E;\n\tFri, 23 Apr 2021 12:47:24 +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 473BB602D1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Apr 2021 12:47:23 +0200 (CEST)", "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0C11A332;\n\tFri, 23 Apr 2021 12:47:20 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Z6kI95xu\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1619174842;\n\tbh=xc75bAVMG8Fk+xiu0QkHuxuR+saagzzTBvvrPLAM4so=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Z6kI95xuQFV4oaydbD9PXnAghiTCgbJBlJQm1qJefcQEhmTPvdRZAsdoL3BLAmgKy\n\tNne09c6YMZm36E2ybCRvblBUpQyW1SDJwEj+rr/inY6RhgFA8jdmTL089L9VoUoWtW\n\tvaldY5m29w/WbVjjz2AnTnxKTr0OZ6JdPdHCUUG8=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 23 Apr 2021 19:47:09 +0900", "Message-Id": "<20210423104711.401547-2-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20210423104711.401547-1-paul.elder@ideasonboard.com>", "References": "<20210423104711.401547-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v3 1/3] utils: ipc: Include instead of\n\tforward-declare CameraSensorInfo", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "For structs defined in core.mojom that have the skipHeader tag, if\nthey're only used in function parameters (in a mojom file) then a\nforward-declaration is sufficient. However, if the struct is used in\nanother struct in a mojom file, then the forward-declaration is\ninsufficient, and the definition needs to be included. Do so for\nCameraSensorInfo, which is the only forward-declared struct in\nipa_interface.h, and update the documentation comment.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nTested-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\nChanges in v3:\n- update the documentation in core.mojom too\n---\n include/libcamera/ipa/core.mojom | 3 +--\n include/libcamera/ipa/ipa_interface.h | 6 +++---\n 2 files changed, 4 insertions(+), 5 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom\nindex 5363f1c5..70de71ea 100644\n--- a/include/libcamera/ipa/core.mojom\n+++ b/include/libcamera/ipa/core.mojom\n@@ -38,8 +38,7 @@\n * implemented in ipa_data_serializer.h, as it cannot be defined in mojom\n * - [skipHeader] and [skipSerdes] only work here in core.mojom.\n * - If a struct definition has [skipHeader], then the header where the\n- * struct is defined must be #included (or the struct forward-declared) in\n- * ipa_interface.h\n+ * struct is defined must be #included in ipa_interface.h\n * - If a field in a struct has a FileDescriptor, but is not explicitly\n * defined so in mojom, then the field must be marked with the [hasFd]\n * attribute.\ndiff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\nindex 5d99e2cf..dfe1b40a 100644\n--- a/include/libcamera/ipa/ipa_interface.h\n+++ b/include/libcamera/ipa/ipa_interface.h\n@@ -18,15 +18,15 @@\n #include <libcamera/geometry.h>\n #include <libcamera/signal.h>\n \n+#include \"libcamera/internal/camera_sensor.h\"\n+\n namespace libcamera {\n \n /*\n * Structs that are defined in core.mojom and have the skipHeader tag must be\n- * forward-declared or #included here.\n+ * #included here.\n */\n \n-struct CameraSensorInfo;\n-\n class IPAInterface\n {\n public:\n", "prefixes": [ "libcamera-devel", "v3", "1/3" ] }