Patch Detail
Show a patch.
GET /api/patches/16691/?format=api
{ "id": 16691, "url": "https://patchwork.libcamera.org/api/patches/16691/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16691/", "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": "<20220719144517.15898-1-naush@raspberrypi.com>", "date": "2022-07-19T14:45:17", "name": "[libcamera-devel] libcamera: controls: Suppress error message from ControlList::find()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "afca85d4ec77dc6c862f4cc404b8d1bfa97e17fe", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16691/mbox/", "series": [ { "id": 3302, "url": "https://patchwork.libcamera.org/api/series/3302/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3302", "date": "2022-07-19T14:45:17", "name": "[libcamera-devel] libcamera: controls: Suppress error message from ControlList::find()", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3302/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16691/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16691/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 B62DFBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Jul 2022 14:45:31 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F41506048A;\n\tTue, 19 Jul 2022 16:45:30 +0200 (CEST)", "from mail-wr1-x430.google.com (mail-wr1-x430.google.com\n\t[IPv6:2a00:1450:4864:20::430])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E396603F4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Jul 2022 16:45:29 +0200 (CEST)", "by mail-wr1-x430.google.com with SMTP id z13so2370567wro.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Jul 2022 07:45:29 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tx5-20020a05600c21c500b003a3188bef63sm9374037wmj.11.2022.07.19.07.45.28\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 19 Jul 2022 07:45:28 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658241931;\n\tbh=k/zG/ljkSuOuSmG/20b4puyBsrVxrkK2j1CtpsZ/oVU=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=TcQU3YDOpbDotMEB3vbm1HUlxPlvHh8xu6fpY2pJ5Eu4Zc1uwOhfAL1fjckFTGSO3\n\tS3cEvmchYAgOb8Gt6TW4p2Vw1aRpnhxVH+9/cX4gUgaq63ygdIgX1x4PPq3+KZnv03\n\t6tqtvAontpBBhWbPastqAP6o8N81RETjndO2aavogTdSxB7+vRGkYJXOYHlQx3/8SB\n\tdvbOkBgJlC9AbbTp/P/jfeORv7f4XQ1alyAN1xccrzGQHPXKK0es13EtxtNAyomii6\n\t5ABWtxsNcRDA3jii8993qK27n+wBnj4Gx5TLpPrJoa72NRur+EwGiWcOd1Xe4dBOPH\n\ttfTVl4LsnMF4g==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=rNY/5LexuX+odnFz4tAEPDs5Ksd92Koi3QfHFr1/7PU=;\n\tb=kRzlVY8Jv4wQMzVOde4OKbM14Ul7o85c9GBo/QMg5CRcj+XovV8Lhg181q2rrIdvOH\n\ttF66IXfTI3XsYKPyUna7quUYEAPN5wYxuGGnZPHktYg+jRaqeCyycyqY8wgm/uFt+dcW\n\tCwL3k7/eOa2HtrjCUzNWTPGuyMToqEH7VVy89egSLsf04Hg2EgvaBEnS18Rw9Y5fkkSR\n\tzDWe/oJf3PuwIKvBiHoG49mwglFw0WXFguv/RyIdaKMROiMsAoGL9uPKeOvxEd9/7R1l\n\tsEySAFWEaHqbzHXeQfWrK1AMxnMV4MQ3+K2nXugKKPbfxrNP0pVe2LlwjL0ht4seKnbH\n\tXd0g==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"kRzlVY8J\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=rNY/5LexuX+odnFz4tAEPDs5Ksd92Koi3QfHFr1/7PU=;\n\tb=G26HJP0LYnS/HrJ+V6fPua+MZHKXIZSojDznWCTbPRwBpjUbMNQKDnULCKX9rvYT+K\n\tKN2FuCdDlMasE9B1vwJzSIqoFZcmNwqRZrX2zsYNujDiQ63X1q4xZ9nRbFedeTX0zIV3\n\t3MALUhmfuB1xWnI5CxtuMMQIrkaILxlGPRuCbqJfEUfOZOP2wL0v1OmrYF1Brf2PkHic\n\tZNSGs+8E2Nt83vadgCiYD3ODigO11ZZaI+H318comIgAlhetBS1iqOD1GKplZBXmelP8\n\tDircBwNIlaR72nG9tJCad2qEGATriINPQrK7Z3xKl0U2rY9X22iCKTzuwYtfHKJ0jafn\n\tZpmw==", "X-Gm-Message-State": "AJIora80kvEcaMUg1CWGtYMtuurdOTZccoY7nOgWLxKxiRjOh65OPTPg\n\tAWEYfxckFG3pJ0VW5wQ0hS641akQOFxLUg==", "X-Google-Smtp-Source": "AGRyM1t/h4xfUbB9eQC/hb6U9wjnnHuSa/71O9fqrX8cDT6hd01ad7uZkh7H66D6fMJzKCXJojKiYQ==", "X-Received": "by 2002:a5d:5903:0:b0:21d:6dd5:d9c3 with SMTP id\n\tv3-20020a5d5903000000b0021d6dd5d9c3mr26370414wrd.85.1658241928775; \n\tTue, 19 Jul 2022 07:45:28 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 19 Jul 2022 15:45:17 +0100", "Message-Id": "<20220719144517.15898-1-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: controls: Suppress error\n\tmessage from ControlList::find()", "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": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Naushir Patuck <naush@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Now that controls::get() returns a std::optional<T> handle invalid controls,\nthe error log message in ControlList::find() is unnecessary and likely invalid\nin the case when calling controls::get() on a missing control. Remove this\nerror message.\n\nFixes: 1c4d48018505 (\"libcamera: controls: Use std::optional to handle invalid control values\")\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/controls.cpp | 12 ++----------\n 1 file changed, 2 insertions(+), 10 deletions(-)", "diff": "diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\nindex 03ac6345247c..701a872185e3 100644\n--- a/src/libcamera/controls.cpp\n+++ b/src/libcamera/controls.cpp\n@@ -1051,24 +1051,16 @@ void ControlList::set(unsigned int id, const ControlValue &value)\n const ControlValue *ControlList::find(unsigned int id) const\n {\n \tconst auto iter = controls_.find(id);\n-\tif (iter == controls_.end()) {\n-\t\tLOG(Controls, Error)\n-\t\t\t<< \"Control \" << utils::hex(id) << \" not found\";\n-\n+\tif (iter == controls_.end())\n \t\treturn nullptr;\n-\t}\n \n \treturn &iter->second;\n }\n \n ControlValue *ControlList::find(unsigned int id)\n {\n-\tif (validator_ && !validator_->validate(id)) {\n-\t\tLOG(Controls, Error)\n-\t\t\t<< \"Control \" << utils::hex(id)\n-\t\t\t<< \" is not valid for \" << validator_->name();\n+\tif (validator_ && !validator_->validate(id))\n \t\treturn nullptr;\n-\t}\n \n \treturn &controls_[id];\n }\n", "prefixes": [ "libcamera-devel" ] }