Show a patch.

GET /api/1.1/patches/20946/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 20946,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/20946/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20946/",
    "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": "<20240815210925.4172287-3-kieran.bingham@ideasonboard.com>",
    "date": "2024-08-15T21:09:24",
    "name": "[2/3] libcamera: media_device: Use MediaLink string helper",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "c7af0eb937f3e683c60ceeacdf6390a5f80c15f6",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20946/mbox/",
    "series": [
        {
            "id": 4525,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4525/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4525",
            "date": "2024-08-15T21:09:22",
            "name": "MediaLink: Provide a string representation",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4525/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20946/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20946/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 1A4C6C32D5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 15 Aug 2024 21:09:39 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 501D8633BE;\n\tThu, 15 Aug 2024 23:09:35 +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 47BB363393\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 15 Aug 2024 23:09:29 +0200 (CEST)",
            "from Monstersaurus.tail69b4.ts.net\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8D011AD8;\n\tThu, 15 Aug 2024 23:08:30 +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=\"ESzEdjeP\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1723756110;\n\tbh=IXrfyC7YOsjHp4baX5kqLCT9tQK55pcgW5Gwg3B15U4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=ESzEdjePQbVmd/0Jg60EsKV23Xnz3n4tdTfu4lRGprNxeYKYnaTTc9YrZzLs5kVcx\n\tg3ilRAyPTD6lAXrdN6q0qKU7BlHcq+qus1zG+OicFU0YoR2tgvr4y/248hHqrDVgeS\n\t8SIVcHFELrVbgHLXmeMryqB7zc4gwnbQN3TeaK2E=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Cc": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "Subject": "[PATCH 2/3] libcamera: media_device: Use MediaLink string helper",
        "Date": "Thu, 15 Aug 2024 22:09:24 +0100",
        "Message-Id": "<20240815210925.4172287-3-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240815210925.4172287-1-kieran.bingham@ideasonboard.com>",
        "References": "<20240815210925.4172287-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\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/media_device.cpp | 14 ++++----------\n 1 file changed, 4 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\nindex bd054552a093..c1ea58996fa8 100644\n--- a/src/libcamera/media_device.cpp\n+++ b/src/libcamera/media_device.cpp\n@@ -817,21 +817,15 @@ int MediaDevice::setupLink(const MediaLink *link, unsigned int flags)\n \tint ret = ioctl(fd_.get(), MEDIA_IOC_SETUP_LINK, &linkDesc);\n \tif (ret) {\n \t\tret = -errno;\n+\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+\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": [
        "2/3"
    ]
}