Show a patch.

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

{
    "id": 22393,
    "url": "https://patchwork.libcamera.org/api/patches/22393/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22393/",
    "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": "<20241218083610.2397879-3-naush@raspberrypi.com>",
    "date": "2024-12-18T08:34:19",
    "name": "[v2,2/4] ipa: rpi: Add erase()/eraseLocked() to RPiController::Metadata",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "e08b7914fe5f4944e2a942f354c3d9ae1064c154",
    "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/22393/mbox/",
    "series": [
        {
            "id": 4910,
            "url": "https://patchwork.libcamera.org/api/series/4910/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4910",
            "date": "2024-12-18T08:34:17",
            "name": "Raspberry Pi: Various changes",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4910/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22393/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22393/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 73EEDC3301\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 18 Dec 2024 08:36:25 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D12566809B;\n\tWed, 18 Dec 2024 09:36:22 +0100 (CET)",
            "from mail-wm1-x331.google.com (mail-wm1-x331.google.com\n\t[IPv6:2a00:1450:4864:20::331])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 43AE967F24\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Dec 2024 09:36:18 +0100 (CET)",
            "by mail-wm1-x331.google.com with SMTP id\n\t5b1f17b1804b1-436284cdbe0so7635775e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Dec 2024 00:36:18 -0800 (PST)",
            "from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-388c804a2f9sm13585781f8f.77.2024.12.18.00.36.17\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 18 Dec 2024 00:36:17 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"E26AXai0\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1734510977; x=1735115777;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=IIG4zUWJV+wv/nFX9HY32UphHg0iL6nIDLZ67W++gCA=;\n\tb=E26AXai03sxzAUPcndG1LZ5n6O/3MUgWnhPkwGQZQKKKqx3EYq061pSs969gKcQ0vm\n\tc/QO1uK9mlLQzRJMlInurJoICPvP7ttZvV/s9EgyQxoj2a/xMyjih80BoTB3x3Lf6W/C\n\t1sZKDJdXSy4sPFjDELLKG+AKihq0cJLQz95t18OUmXvRLjrjOBdnxhwEhNWaUWgF2XTB\n\tjNzQEZNOFCD/rInNSW/cH0jOaVdz70PVm3tVKZWV1XLkbnAW58dolrStZ+SFwdWxRYwk\n\t+TICSY2D68UGW2FybBJtvjpaCvr41EgK0oL1sqVEvQTyfE7Sr30DtGZH9SMtj742sYtz\n\tYgrQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1734510977; x=1735115777;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=IIG4zUWJV+wv/nFX9HY32UphHg0iL6nIDLZ67W++gCA=;\n\tb=uRdOudaII7ra15hQapWL9Kjyhg5XY/sZkZSBSA+KFapDT38Tb7A3NlWmn/8MLq5a15\n\tGa+/Rx+UtanipCSIPqfnJwh5qFeYKVk5DkOcZFqg5u8mV5newvNjj/g5aS0LEQwOUbGp\n\t0VSAmqcXLqtMxFMrgmlULhai88gimzhU3mGa5powR2Rd528ePTGM/MFdXQI2h+UFxqG1\n\tWDqe1gRFi85ouuUt2so22rQ/BYNTXB58KCf3K0V0SEiyQR9tA4zAv+yML8XVjxndRSxx\n\tA9WLohonJxGC1Uoes2WFQuIGYGj6vHlYEk2ivVTQNb14i5wYx43Zgg1QwBnajxPLYOru\n\tMmAw==",
        "X-Gm-Message-State": "AOJu0YzUAGgRHRBuVm0B8Cgig5BZsmkIP2fgAw2pmYc1sMhtenEb8pwo\n\tStPWHQfwH9pDzT8q8C5Cjp0SSj1CuQVuNCo1od2fvubRSin+1wX5hEngezeUfVg61PI2q5VBbrN\n\tQ",
        "X-Gm-Gg": "ASbGncsYPynHjDnlo7KFg4/TrVmosYXWt3VuBAnGhD26JvHf6lw5jo6x8/Emt1xZnNB\n\tkwcfe1sIysluCqkU+RUnsda2LHbn63kgDRvW7gmCjETHYTQY71VBbqL4LsvTNjk7G/QRaGreQoJ\n\tOKoNbkmwp4OMqIKS/Qv13eb8buUwKqSCdVhKeB4hztsYM/V6Mj+zR371C0w5dKfszdG/50lCaE8\n\tsFXLLmhldEMPS9hsRrdb0ol2jWBPpBklEk+OXf/5W+NRstkbGLYYRDWJzqDd4HOoNBt0QVzotBk",
        "X-Google-Smtp-Source": "AGHT+IHpHg/mJ7H11VPfQ9StlNm7JPM4U7gh5xJ0HQ9ClBuovz2CNnixYP6bk0+usnUFEOMkMAO8Uw==",
        "X-Received": "by 2002:a05:600c:5249:b0:434:f586:7535 with SMTP id\n\t5b1f17b1804b1-436550b129amr6152215e9.0.1734510977591; \n\tWed, 18 Dec 2024 00:36:17 -0800 (PST)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Naushir Patuck <naush@raspberrypi.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Subject": "[PATCH v2 2/4] ipa: rpi: Add erase()/eraseLocked() to\n\tRPiController::Metadata",
        "Date": "Wed, 18 Dec 2024 08:34:19 +0000",
        "Message-ID": "<20241218083610.2397879-3-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20241218083610.2397879-1-naush@raspberrypi.com>",
        "References": "<20241218083610.2397879-1-naush@raspberrypi.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": "These functions erase a key/value pair from the metadata object.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/rpi/controller/metadata.h | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)",
    "diff": "diff --git a/src/ipa/rpi/controller/metadata.h b/src/ipa/rpi/controller/metadata.h\nindex b884490918c7..77d3b0745059 100644\n--- a/src/ipa/rpi/controller/metadata.h\n+++ b/src/ipa/rpi/controller/metadata.h\n@@ -91,6 +91,12 @@ public:\n \t\tdata_.insert(other.data_.begin(), other.data_.end());\n \t}\n \n+\tvoid erase(std::string const &tag)\n+\t{\n+\t\tstd::scoped_lock lock(mutex_);\n+\t\teraseLocked(tag);\n+\t}\n+\n \ttemplate<typename T>\n \tT *getLocked(std::string const &tag)\n \t{\n@@ -111,6 +117,14 @@ public:\n \t\tdata_[tag] = std::forward<T>(value);\n \t}\n \n+\tvoid eraseLocked(std::string const &tag)\n+\t{\n+\t\tauto it = data_.find(tag);\n+\t\tif (it == data_.end())\n+\t\t\treturn;\n+\t\tdata_.erase(it);\n+\t}\n+\n \t/*\n \t * Note: use of (lowercase) lock and unlock means you can create scoped\n \t * locks with the standard lock classes.\n",
    "prefixes": [
        "v2",
        "2/4"
    ]
}