Cover Letter Detail
Show a cover letter.
GET /api/1.1/covers/17520/?format=api
{ "id": 17520, "url": "https://patchwork.libcamera.org/api/1.1/covers/17520/?format=api", "web_url": "https://patchwork.libcamera.org/cover/17520/", "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": "<20221004021842.6345-1-laurent.pinchart@ideasonboard.com>", "date": "2022-10-04T02:18:40", "name": "[libcamera-devel,0/2] libcamera: Simplify error handling with Cleaner class", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/cover/17520/mbox/", "series": [ { "id": 3530, "url": "https://patchwork.libcamera.org/api/1.1/series/3530/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3530", "date": "2022-10-04T02:18:40", "name": "libcamera: Simplify error handling with Cleaner class", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3530/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/covers/17520/comments/", "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 6B144BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 4 Oct 2022 02:18:47 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8655F60A7D;\n\tTue, 4 Oct 2022 04:18:46 +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 A4A97603F6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 4 Oct 2022 04:18:45 +0200 (CEST)", "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F2A57517;\n\tTue, 4 Oct 2022 04:18:44 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664849926;\n\tbh=drx5bktiN07LT2venuVspMSEJM8klFbNTZ6lAMnBex8=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=x+U7O68OUNqmujA8sjH0xBb4WAllkFhnXc/VCP1Jszw981f+Jwla+ycwqts6sBaH7\n\tx1WjijqiA4I+ZuiTYkerdCLzt+C83azMlUHcBrHllLi6Vc1m9MPG6ElYo/EdakkjVg\n\tNCerMqgm3zAymeO3VMfZG/1tKnLW4XcU17EBORCZfDqgG58s8zI9SCbuW88Fk5tmTR\n\tZhukcFEgFFI/zn4Mpda55kt+brb71owGBYwChxShTXEr+dbdLFivi0P20R9jUw/Y4B\n\t6jT4woG9T+umDZCpOB9rEHTcqHcj90dLjotyyyzEF0TtfbTUEcO76sT2AKnJ3EyKPu\n\tp1iwCIClyqGMw==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1664849925;\n\tbh=drx5bktiN07LT2venuVspMSEJM8klFbNTZ6lAMnBex8=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=bScxrRXVGqfFPE9jufbqkZPWlYGH3nH5AtxSjMXxqxf4Q3XKJXsUiZCIlDE7rfk8m\n\tgnTIla/jA996yJ+G9bgG8T8lJibblNaHB7oHfaqkBb0/No6C1QDl7QqsEcHy4vv42q\n\t1aB+FOA8hMzSbbIOlhfsPmKaSVemb00oExpeUjyQ=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"bScxrRXV\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 4 Oct 2022 05:18:40 +0300", "Message-Id": "<20221004021842.6345-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 0/2] libcamera: Simplify error handling\n\twith Cleaner class", "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": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Hello,\n\nThis small patch series stems from my review of \"[PATCH 13/14]\nlibcamera: pipeline: rkisp1: Factorize errors handling path on start()\".\nWhile I agreed that the current error handling pattern in\nPipelineHandlerRkISP1::start() is fairly bad, I wasn't thrilled by usage\nof goto statements to fix it. This is an alternative proposal.\n\nThe Cleaner class introduced in patch 1/2 took multiple forms before\nreaching this one. I first experimented with a class that handled a\nsingle action and thus needed to be instantiated once per action. To\nachieve the equivalent of the Cleaner::clear() call I had to either add\nan 'if (ret)' statement to the lambda functions, or pass the ret\nvariable to the constructor of the Cleaner. I found ideas for syntactic\nsugar in https://github.com/yuri-kilochek/boost.scope_guard, but in the\nend, neither option made me very happy.\n\nHandling multiple deferred cleanup actions with one Cleaner instance\nmakes the user code (in 2/2) simpler. The \"defer\" name for the\nCleaner::defer() function was influenced by an interesting C extension\nproposal (https://hal.inria.fr/hal-03059076/document). It uses the name\n\"guard\" for the conceptual equivalent of the Cleaner class, but that\ndidn't convince me. I'm not sure to really like the \"Cleaner\" name\nthough, alternative naming proposals are welcome.\n\nOne point I'm not happy with is the need to call Cleaner::clear() in the\nsuccess path. This is error-prone as it could be forgotten. We could\nswitch to the opposite, with cleanups disabled by default and an\nexplicit call in the error paths, but that could also be forgotten,\nresulting in missing cleanups in some error paths. The result would\npossibly be worse, as error paths are less tested. Another option would\nbe to require explicit calls in both the success and error paths, and\ncomplain loudly in the destructor if none of those functions have been\ncalled. I'm not sure to be convinced it would be the best idea, although\nfinding good names for the success/error functions may help. Alternative\nideas are welcome too, as well as opinions regarding whether this is\nworth it or not.\n\nLaurent Pinchart (2):\n libcamera: utils: Add Cleaner class\n pipeline: rkisp1: Use utils::Cleaner to simplify error handling in\n start\n\n include/libcamera/base/utils.h | 13 +++\n src/libcamera/base/utils.cpp | 130 +++++++++++++++++++++++\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 31 ++----\n 3 files changed, 154 insertions(+), 20 deletions(-)" }