Patch Detail
Show a patch.
GET /api/patches/2924/?format=api
{ "id": 2924, "url": "https://patchwork.libcamera.org/api/patches/2924/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2924/", "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": "<20200229164254.23604-7-laurent.pinchart@ideasonboard.com>", "date": "2020-02-29T16:42:29", "name": "[libcamera-devel,06/31] libcamera: ipa: Test control structure size with static_assert", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "39bd32272873615314112920f4194006b466bbf8", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2924/mbox/", "series": [ { "id": 696, "url": "https://patchwork.libcamera.org/api/series/696/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=696", "date": "2020-02-29T16:42:23", "name": "libcamera: Add support for array controls", "version": 1, "mbox": "https://patchwork.libcamera.org/series/696/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2924/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2924/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 50DA262689\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Feb 2020 17:43:24 +0100 (CET)", "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E479233E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Feb 2020 17:43:23 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1582994604;\n\tbh=2Rz6XO1bXJrYs0sXHFeMDi56iMZxCJgRhR1LvT0iyxg=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=qLgNf3dOF6Rx5/6K4a/QPY9T+Y8VZcZCezSehwoIOhr+Uw2UMHRr/8Ku6r2PNTbsC\n\tYW84bLIOxyxRiWUcWSdA/1tnrUJEgHNxfYxAtoQXHUKgg3CAUjHnqaY2OQPfz9OtYr\n\tPELRCYl0Ajdpa5eVQ8vWSVpQD0VKSxLbPOX4qvyA=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 29 Feb 2020 18:42:29 +0200", "Message-Id": "<20200229164254.23604-7-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.24.1", "In-Reply-To": "<20200229164254.23604-1-laurent.pinchart@ideasonboard.com>", "References": "<20200229164254.23604-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 06/31] libcamera: ipa: Test control\n\tstructure size with static_assert", "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>", "X-List-Received-Date": "Sat, 29 Feb 2020 16:43:25 -0000" }, "content": "The control-related structures ipa_controls_header,\nipa_control_value_entry and ipa_control_range_entry define the IPA\nprotocol and are thus part of the ABI. To avoid breaking it\ninadvertently, use static_assert() to check the size of the structures.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/ipa_controls.cpp | 9 +++++++++\n 1 file changed, 9 insertions(+)", "diff": "diff --git a/src/libcamera/ipa_controls.cpp b/src/libcamera/ipa_controls.cpp\nindex dd3ff9a0d467..25f38bab3dd9 100644\n--- a/src/libcamera/ipa_controls.cpp\n+++ b/src/libcamera/ipa_controls.cpp\n@@ -153,6 +153,9 @@\n * Reserved for future extensions\n */\n \n+static_assert(sizeof(ipa_controls_header) == 32,\n+\t \"Invalid size for struct ipa_control_header\");\n+\n /**\n * \\struct ipa_control_value_entry\n * \\brief Description of a serialized ControlValue entry\n@@ -167,6 +170,9 @@\n * value data (shall be a multiple of 8 bytes).\n */\n \n+static_assert(sizeof(ipa_control_value_entry) == 16,\n+\t \"Invalid size for struct ipa_control_value_entry\");\n+\n /**\n * \\struct ipa_control_range_entry\n * \\brief Description of a serialized ControlRange entry\n@@ -180,3 +186,6 @@\n * \\var ipa_control_range_entry::padding\n * Padding bytes (shall be set to 0)\n */\n+\n+static_assert(sizeof(ipa_control_range_entry) == 16,\n+\t \"Invalid size for struct ipa_control_range_entry\");\n", "prefixes": [ "libcamera-devel", "06/31" ] }