Patch Detail
Show a patch.
GET /api/patches/21241/?format=api
{ "id": 21241, "url": "https://patchwork.libcamera.org/api/patches/21241/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21241/", "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": "<20240911211816.73763-4-kieran.bingham@ideasonboard.com>", "date": "2024-09-11T21:18:15", "name": "[v2,3/4] libcamera: media_device: Use MediaLink string helper", "commit_ref": "4035f5754e1dd6a857b86c183d5d344353e16b2c", "pull_url": null, "state": "accepted", "archived": false, "hash": "f4f2c91ceab3b3c30642048d195ed25e16295a24", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/21241/mbox/", "series": [ { "id": 4582, "url": "https://patchwork.libcamera.org/api/series/4582/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4582", "date": "2024-09-11T21:18:12", "name": "MediaLink: Provide a string representation", "version": 2, "mbox": "https://patchwork.libcamera.org/series/4582/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21241/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21241/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 CF77CC324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 11 Sep 2024 21:18:40 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3987F63506;\n\tWed, 11 Sep 2024 23:18: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 2009A634FB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 11 Sep 2024 23:18:27 +0200 (CEST)", "from charm.tail69b4.ts.net (213-229-8-243.static.upcbusiness.at\n\t[213.229.8.243])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2A32BBEB;\n\tWed, 11 Sep 2024 23:17:09 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"S0G08kSK\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1726089430;\n\tbh=KMPtBgA6ElkSiiL4dlJFYbbzxlxGy6+uguxmeIzSY/k=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=S0G08kSKrxk1AkGvKXamEORBvxMHFuJ0wQYjtyC4+vuuwXh+4TwYNfoxXKH06YBFF\n\tlIszsnfJhBLugaYDMKgbpdZ92HBI5+XKx5sqsBNqaY6dqyW+cbGmFc//HgFOGPDvo7\n\tE4ZTv5cdztYXNe6gZ6EeKaP030RR189V3xzpGG5c=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Cc": "Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>", "Subject": "[PATCH v2 3/4] libcamera: media_device: Use MediaLink string helper", "Date": "Wed, 11 Sep 2024 23:18:15 +0200", "Message-ID": "<20240911211816.73763-4-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.46.0", "In-Reply-To": "<20240911211816.73763-1-kieran.bingham@ideasonboard.com>", "References": "<20240911211816.73763-1-kieran.bingham@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Replace the two open-coded implementations of a link representation\nwith the operator<< overload string representation to simplify\nthe code and unify appearance of reporting MediaLinks.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/media_device.cpp | 12 ++----------\n 1 file changed, 2 insertions(+), 10 deletions(-)", "diff": "diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\nindex bd054552a093..d71dad74df70 100644\n--- a/src/libcamera/media_device.cpp\n+++ b/src/libcamera/media_device.cpp\n@@ -818,20 +818,12 @@ int MediaDevice::setupLink(const MediaLink *link, unsigned int flags)\n \tif (ret) {\n \t\tret = -errno;\n \t\tLOG(MediaDevice, Error)\n-\t\t\t<< \"Failed to setup link \"\n-\t\t\t<< source->entity()->name() << \"[\"\n-\t\t\t<< source->index() << \"] -> \"\n-\t\t\t<< sink->entity()->name() << \"[\"\n-\t\t\t<< sink->index() << \"]: \"\n+\t\t\t<< \"Failed to setup link \" << *link << \": \"\n \t\t\t<< strerror(-ret);\n \t\treturn ret;\n \t}\n \n-\tLOG(MediaDevice, Debug)\n-\t\t<< source->entity()->name() << \"[\"\n-\t\t<< source->index() << \"] -> \"\n-\t\t<< sink->entity()->name() << \"[\"\n-\t\t<< sink->index() << \"]: \" << flags;\n+\tLOG(MediaDevice, Debug) << *link << \": \" << flags;\n \n \treturn 0;\n }\n", "prefixes": [ "v2", "3/4" ] }