Patch Detail
Show a patch.
GET /api/patches/2926/?format=api
{ "id": 2926, "url": "https://patchwork.libcamera.org/api/patches/2926/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2926/", "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-9-laurent.pinchart@ideasonboard.com>", "date": "2020-02-29T16:42:31", "name": "[libcamera-devel,08/31] libcamera: controls: Don't convert 32-bit and 64-bit implicitly", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "7a7248d98534609474f470367ce7e0436d26f2b9", "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/2926/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/2926/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2926/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 0B37062789\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Feb 2020 17:43:25 +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 A48E4ABC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Feb 2020 17:43:24 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1582994604;\n\tbh=K//ya32xbstbTy7UFqCFllLBS+9oWm1kZHrC0wMqcNM=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=GJxpyHL9Qvx+SaGbrTmJmkZdleQVenVZqP/PSNPDPSMkQJJLyO70CKYwriQsBFJgJ\n\tlbUxbdar6kBdM2Ztst+EgAMKwJLBKIh2bPOXkpW5lzPyhqs7s1RAwFIuFHLtxbWKSX\n\tNA3l0lXxEYu/i6PMZfdDt6jFCElqY29rpxxg+lOE=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 29 Feb 2020 18:42:31 +0200", "Message-Id": "<20200229164254.23604-9-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 08/31] 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": "Sat, 29 Feb 2020 16:43:25 -0000" }, "content": "The 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\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\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 613e6d768c0f..f632d60adc8b 100644\n--- a/src/libcamera/controls.cpp\n+++ b/src/libcamera/controls.cpp\n@@ -187,7 +187,7 @@ const bool &ControlValue::get<bool>() const\n template<>\n const int32_t &ControlValue::get<int32_t>() const\n {\n-\tASSERT(type_ == ControlTypeInteger32 || type_ == ControlTypeInteger64);\n+\tASSERT(type_ == ControlTypeInteger32);\n \n \treturn integer32_;\n }\n@@ -195,7 +195,7 @@ const int32_t &ControlValue::get<int32_t>() const\n template<>\n const 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", "08/31" ] }