Patch Detail
Show a patch.
GET /api/1.1/patches/12302/?format=api
{ "id": 12302, "url": "https://patchwork.libcamera.org/api/1.1/patches/12302/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12302/", "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": "<20210515040511.23294-5-laurent.pinchart@ideasonboard.com>", "date": "2021-05-15T04:05:11", "name": "[libcamera-devel,v2,4/4] v4l2: Adapt to utils::enumerate() usage of named fields", "commit_ref": null, "pull_url": null, "state": "rejected", "archived": false, "hash": "17099a00b0351867cf8d715ef99a76ecd0a9e915", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": { "id": 14, "url": "https://patchwork.libcamera.org/api/1.1/users/14/?format=api", "username": "pinchartl", "first_name": "Laurent", "last_name": "Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/12302/mbox/", "series": [ { "id": 2032, "url": "https://patchwork.libcamera.org/api/1.1/series/2032/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2032", "date": "2021-05-15T04:05:07", "name": "libcamera: Simplify range-based for loop counters", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2032/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12302/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12302/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 74768C31F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 15 May 2021 04:05:32 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0918968919;\n\tSat, 15 May 2021 06:05:32 +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 28FD168920\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 15 May 2021 06:05:27 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B43C36EE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 15 May 2021 06:05:26 +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=\"UVO3X358\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621051526;\n\tbh=5kg12NqlBw/SExg63szd59FYREyrjhOUD19hARUxaoM=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=UVO3X3581J0O82BlcpoIPnghuF02WIuC7OEGarOclqbZwZ3fv+8o2B6seSpykeZCn\n\taORNtn8qfS5rPx4XoIlA6kHc/erNpf7ikMbjygKdJbhjds3J2Hodaz3LOa1glma159\n\tZaHvDBkBWvOOhTVI5tM/m3UDymcEFG5Eq9k3lF8U=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 15 May 2021 07:05:11 +0300", "Message-Id": "<20210515040511.23294-5-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.28.1", "In-Reply-To": "<20210515040511.23294-1-laurent.pinchart@ideasonboard.com>", "References": "<20210515040511.23294-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v2 4/4] v4l2: Adapt to utils::enumerate()\n\tusage of named fields", "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": "This will be squashed with \"v4l2: Replace manual loop counters with\nutils::enumerate()\" if \"libcamera: utils: enumerate: Use named fields\nfor result\" is accepted.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/v4l2/v4l2_compat_manager.cpp | 11 ++++++-----\n 1 file changed, 6 insertions(+), 5 deletions(-)", "diff": "diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp\nindex 96dbcdf28f04..bf5bf8e3223d 100644\n--- a/src/v4l2/v4l2_compat_manager.cpp\n+++ b/src/v4l2/v4l2_compat_manager.cpp\n@@ -83,8 +83,9 @@ int V4L2CompatManager::start()\n \t * created here to wrap a camera device.\n \t */\n \tauto cameras = cm_->cameras();\n-\tfor (auto [index, camera] : utils::enumerate(cameras)) {\n-\t\tV4L2CameraProxy *proxy = new V4L2CameraProxy(index, camera);\n+\tfor (const auto camera : utils::enumerate(cameras)) {\n+\t\tV4L2CameraProxy *proxy = new V4L2CameraProxy(camera.index,\n+\t\t\t\t\t\t\t camera.value);\n \t\tproxies_.emplace_back(proxy);\n \t}\n \n@@ -118,9 +119,9 @@ int V4L2CompatManager::getCameraIndex(int fd)\n \t\treturn -1;\n \n \tauto cameras = cm_->cameras();\n-\tfor (auto [index, camera] : utils::enumerate(cameras)) {\n-\t\tif (camera == target)\n-\t\t\treturn index;\n+\tfor (const auto camera : utils::enumerate(cameras)) {\n+\t\tif (camera.value == target)\n+\t\t\treturn camera.index;\n \t}\n \n \treturn -1;\n", "prefixes": [ "libcamera-devel", "v2", "4/4" ] }