Patch Detail
Show a patch.
GET /api/1.1/patches/10283/?format=api
{ "id": 10283, "url": "https://patchwork.libcamera.org/api/1.1/patches/10283/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10283/", "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": "<20201028012114.3848208-1-niklas.soderlund@ragnatech.se>", "date": "2020-10-28T01:21:14", "name": "[libcamera-devel] libcamera: v4l2_device: Remove unused set of ret", "commit_ref": "bfd588d1d8332453b5f7afc6749fc6f3bf00c0bd", "pull_url": null, "state": "accepted", "archived": false, "hash": "abd88935089441111b987bb8aa1d91600df243cd", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/1.1/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/10283/mbox/", "series": [ { "id": 1424, "url": "https://patchwork.libcamera.org/api/1.1/series/1424/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1424", "date": "2020-10-28T01:21:14", "name": "[libcamera-devel] libcamera: v4l2_device: Remove unused set of ret", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1424/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10283/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10283/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 CE326C3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Oct 2020 01:21:25 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4B5EF62244;\n\tWed, 28 Oct 2020 02:21:25 +0100 (CET)", "from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BC536034B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Oct 2020 02:21:24 +0100 (CET)", "from bismarck.berto.se (p4fca2458.dip0.t-ipconnect.de\n\t[79.202.36.88])\n\tby bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA\n\tid de43cc4b-18bb-11eb-8ba4-005056917f90;\n\tWed, 28 Oct 2020 02:21:20 +0100 (CET)" ], "X-Halon-ID": "de43cc4b-18bb-11eb-8ba4-005056917f90", "Authorized-sender": "niklas.soderlund@fsdn.se", "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 28 Oct 2020 02:21:14 +0100", "Message-Id": "<20201028012114.3848208-1-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.29.1", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH] libcamera: v4l2_device: Remove unused set\n\tof ret", "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=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The last assignment of the ret variable in getControls() is not consumed\nso it's unnecessary to set it. This likely originates from a similar\ncode flow in setControls() where the ret variable is later consumed.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/v4l2_device.cpp | 1 -\n 1 file changed, 1 deletion(-)", "diff": "diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 31d4dad0ee47b734..f747ba790886cfe0 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -243,7 +243,6 @@ ControlList V4L2Device::getControls(const std::vector<uint32_t> &ids)\n \t\tLOG(V4L2, Error) << \"Unable to read control \" << errorIdx\n \t\t\t\t << \": \" << strerror(-ret);\n \t\tcount = errorIdx - 1;\n-\t\tret = errorIdx;\n \t}\n \n \tupdateControls(&ctrls, v4l2Ctrls, count);\n", "prefixes": [ "libcamera-devel" ] }