Patch Detail
Show a patch.
GET /api/1.1/patches/17393/?format=api
{ "id": 17393, "url": "https://patchwork.libcamera.org/api/1.1/patches/17393/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17393/", "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": "<20220925122324.260251-1-umang.jain@ideasonboard.com>", "date": "2022-09-25T12:23:24", "name": "[libcamera-devel] libcamera: v4l2_device: Log control id instead of errorIdx", "commit_ref": "ed591e705c451d0ce14988ae96829a31a2ae2f9a", "pull_url": null, "state": "accepted", "archived": false, "hash": "12f18926558efaf92e8d3b288995eaa51eab5a04", "submitter": { "id": 86, "url": "https://patchwork.libcamera.org/api/1.1/people/86/?format=api", "name": "Umang Jain", "email": "umang.jain@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17393/mbox/", "series": [ { "id": 3499, "url": "https://patchwork.libcamera.org/api/1.1/series/3499/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3499", "date": "2022-09-25T12:23:24", "name": "[libcamera-devel] libcamera: v4l2_device: Log control id instead of errorIdx", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3499/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17393/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17393/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 71FA6C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 25 Sep 2022 12:23:35 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B340362243;\n\tSun, 25 Sep 2022 14:23:34 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B2C1A621BC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 25 Sep 2022 14:23:33 +0200 (CEST)", "from umang.jainideasonboard.com (unknown\n\t[IPv6:2405:205:1089:f265:b627:9c56:fa7a:38e1])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D314C2B3;\n\tSun, 25 Sep 2022 14:23:31 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664108614;\n\tbh=If+Nqi59cSPImxpuSnRZm6kcCa8qXaqNgCzUQGJe24w=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=u+G2aCWJW7EImncwGXLWis3dZZ1aPu8mbC9jIAigeMkdRiLrhzLjKJinKUaiwt5qV\n\tIcA553XcFBfnbSkighIM9J9n/N2Jn0eIu8RI1ZNbZj2FcQKjPSsH1vUwa9guPpaA3M\n\t25rUsXJ0v9sT7bWg1khK6fs/RzSOg7lepSSz+GDPtJ64QI25f31Qq/YxlctYWWwLd5\n\tdeMryfD+ESslF+eED1+wttW2ZmtNfQwmsZyrOHg7DKAGwLPMZaVlvgR/qbj2Qoqaxz\n\t9qeoX1eHeUFv6H2HBeWjsrOUKKArYVWzhaich7tCkKvN3DHYTw0J8BuiGFSMrK37yZ\n\tqMPfImJwpp3Vg==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1664108613;\n\tbh=If+Nqi59cSPImxpuSnRZm6kcCa8qXaqNgCzUQGJe24w=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=O1JXEtyguu0vfC2X7fcURaEJxcP72m0s30TvOc/f06TG5+uqZJxVZW1RIf+JthEhn\n\tGnJhKIINZD+QPmd7W6A8eg7LXYOsZCiw71E5shqMQEkV15JC8lKoeQeGAhrW3Re7oi\n\t9ax4qA2qYptvSOeneOwMsTKhCmBSDItrk+e+Vi7w=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"O1JXEtyg\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sun, 25 Sep 2022 17:53:24 +0530", "Message-Id": "<20220925122324.260251-1-umang.jain@ideasonboard.com>", "X-Mailer": "git-send-email 2.37.3", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: v4l2_device: Log control id\n\tinstead of errorIdx", "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>", "From": "Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "Umang Jain <umang.jain@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "v4l2_ext_controls.errorIdx (in the case of single failing control for\nVIDIOC_*_EXT_CTRLS calls) represents the index of that control.\nSince it is a single control, we can print the control id rather than\nits index. This improves logging as the id can be easily co-related\nwith the controls while reading the log.\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/libcamera/v4l2_device.cpp | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 83901763..c60f7c91 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -244,7 +244,8 @@ ControlList V4L2Device::getControls(const std::vector<uint32_t> &ids)\n \t\t}\n \n \t\t/* A specific control failed. */\n-\t\tLOG(V4L2, Error) << \"Unable to read control \" << errorIdx\n+\t\tconst unsigned int id = v4l2Ctrls[errorIdx].id;\n+\t\tLOG(V4L2, Error) << \"Unable to read control \" << utils::hex(id)\n \t\t\t\t << \": \" << strerror(-ret);\n \n \t\tv4l2Ctrls.resize(errorIdx);\n@@ -354,7 +355,8 @@ int V4L2Device::setControls(ControlList *ctrls)\n \t\t}\n \n \t\t/* A specific control failed. */\n-\t\tLOG(V4L2, Error) << \"Unable to set control \" << errorIdx\n+\t\tconst unsigned int id = v4l2Ctrls[errorIdx].id;\n+\t\tLOG(V4L2, Error) << \"Unable to set control \" << utils::hex(id)\n \t\t\t\t << \": \" << strerror(-ret);\n \n \t\tv4l2Ctrls.resize(errorIdx);\n", "prefixes": [ "libcamera-devel" ] }