Patch Detail
Show a patch.
GET /api/patches/16044/?format=api
{ "id": 16044, "url": "https://patchwork.libcamera.org/api/patches/16044/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16044/", "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": "<20220525222503.6460-2-laurent.pinchart@ideasonboard.com>", "date": "2022-05-25T22:24:59", "name": "[libcamera-devel,1/5] libcamera: base: log: Remove unnecessary local variable", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "2a1d8034fe1450b13c60a8c6f41065b05ec0fb80", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16044/mbox/", "series": [ { "id": 3140, "url": "https://patchwork.libcamera.org/api/series/3140/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3140", "date": "2022-05-25T22:24:58", "name": "libcamera: Add colors to the log", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3140/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16044/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16044/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 6A2C8BD161\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 May 2022 22:25:16 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1F48E65671;\n\tThu, 26 May 2022 00:25:16 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 18D1060422\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 May 2022 00:25:12 +0200 (CEST)", "from pendragon.ideasonboard.com (ip-109-40-242-63.web.vodafone.de\n\t[109.40.242.63])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8CDC2AFD;\n\tThu, 26 May 2022 00:25:11 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1653517516;\n\tbh=INnkauI5QY7zzg0eLFg/dvCTVOoF5Vo5N0zb8WkSeA4=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=1ayhZPuEUQIEi3hkINpDdVg9iZtYfmJloYrv8drPryQVGQyc9uvO6fZj5xKJNgRPp\n\t53XlWezzX2O4WfvmvJ167VQM14YBsaawYXzsKhosgzxf+oVYVbi5yDVlx7pKCoyUew\n\tQQLvPK/4DL7EaB4uVthhzgqcRedO4qYbo9yH+kDDyK5SwxqMGxGZOx9v2e1Wc3mCBX\n\tM/rUU3ZOpqJBfTEdxIRdfvlNdYiLLftToF0zhEYlYFfTJ/qp+6Bn75xsrwBr2MFrD+\n\tNKcU//45RYMixMivGDSlQpCKzUkLoPXJljmfS0Js4XKXo52Smz6eVcp8/8oJ2G3btV\n\t7RiiCrUIi3AbA==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1653517511;\n\tbh=INnkauI5QY7zzg0eLFg/dvCTVOoF5Vo5N0zb8WkSeA4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=bdTA7vL+0NsOaQYeBJxX9fw7bO3axL3m1m8hwZ4hwHaqrpEx8usVX4dHoEfwGJY03\n\txdVymxGPdrLAaiEe5TUxYHUHY7t/WcwWqEMJkejNt4VT1tvmD3Y5kQVq80KkRj48U/\n\tnP2FgaLdmwV6J2n8PyEO3z6NJxW/dqe4yoz5pp5A=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"bdTA7vL+\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 26 May 2022 01:24:59 +0300", "Message-Id": "<20220525222503.6460-2-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20220525222503.6460-1-laurent.pinchart@ideasonboard.com>", "References": "<20220525222503.6460-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/5] libcamera: base: log: Remove\n\tunnecessary local variable", "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": "The output local variable in Logger::logSetTarget() isn't necessary.\nRemove it.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/base/log.cpp | 6 +-----\n 1 file changed, 1 insertion(+), 5 deletions(-)", "diff": "diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp\nindex 64813b6607c5..df84ba4e8328 100644\n--- a/src/libcamera/base/log.cpp\n+++ b/src/libcamera/base/log.cpp\n@@ -477,15 +477,11 @@ int Logger::logSetStream(std::ostream *stream)\n */\n int Logger::logSetTarget(enum LoggingTarget target)\n {\n-\tstd::shared_ptr<LogOutput> output;\n-\n \tswitch (target) {\n \tcase LoggingTargetSyslog:\n-\t\toutput = std::make_shared<LogOutput>();\n-\t\tstd::atomic_store(&output_, output);\n+\t\tstd::atomic_store(&output_, std::make_shared<LogOutput>());\n \t\tbreak;\n \tcase LoggingTargetNone:\n-\t\toutput = nullptr;\n \t\tstd::atomic_store(&output_, std::shared_ptr<LogOutput>());\n \t\tbreak;\n \tdefault:\n", "prefixes": [ "libcamera-devel", "1/5" ] }