Patch Detail
Show a patch.
GET /api/1.1/patches/2631/?format=api
{ "id": 2631, "url": "https://patchwork.libcamera.org/api/1.1/patches/2631/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2631/", "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": "<20200113164245.52535-17-jacopo@jmondi.org>", "date": "2020-01-13T16:42:38", "name": "[libcamera-devel,16/23] libcamera: controls: Don't convert 32-bit and 64-bit implicitly", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "ff03e23aacdf450516c29a85c85269483180b77b", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2631/mbox/", "series": [ { "id": 618, "url": "https://patchwork.libcamera.org/api/1.1/series/618/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=618", "date": "2020-01-13T16:42:22", "name": "Properties and compound controls", "version": 1, "mbox": "https://patchwork.libcamera.org/series/618/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2631/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2631/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CE5A060703\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Jan 2020 17:40:36 +0100 (CET)", "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id 247AA100005;\n\tMon, 13 Jan 2020 16:40:35 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 13 Jan 2020 17:42:38 +0100", "Message-Id": "<20200113164245.52535-17-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.24.0", "In-Reply-To": "<20200113164245.52535-1-jacopo@jmondi.org>", "References": "<20200113164245.52535-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 16/23] libcamera: controls: Don't convert\n\t32-bit and 64-bit implicitly", "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": "Mon, 13 Jan 2020 16:40:37 -0000" }, "content": "From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nThe ControlValue::get<T>() method verifies that the T type corresponds\nto the ControlValue type. It however accepts int32_t as a return type\nfor 64-bit integer controls, and int64_t as a return type for 32-bit\ninteger controls. There's no reason to do so anymore, make the type\ncheck stricter.\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/controls.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\nindex 7718a53911e6..c311ab1d6af1 100644\n--- a/src/libcamera/controls.cpp\n+++ b/src/libcamera/controls.cpp\n@@ -255,7 +255,7 @@ Span<bool> ControlValue::get<Span<bool>>() const\n template<>\n int32_t ControlValue::get<int32_t>() const\n {\n-\tASSERT(type_ == ControlTypeInteger32 || type_ == ControlTypeInteger64);\n+\tASSERT(type_ == ControlTypeInteger32);\n \n \treturn integer32_;\n }\n@@ -272,7 +272,7 @@ Span<int32_t> ControlValue::get<Span<int32_t>>() const\n template<>\n int64_t ControlValue::get<int64_t>() const\n {\n-\tASSERT(type_ == ControlTypeInteger32 || type_ == ControlTypeInteger64);\n+\tASSERT(type_ == ControlTypeInteger64);\n \n \treturn integer64_;\n }\n", "prefixes": [ "libcamera-devel", "16/23" ] }