get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2224917,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2224917/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260419143247.437733-7-dario.binacchi@amarulasolutions.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null
    },
    "msgid": "<20260419143247.437733-7-dario.binacchi@amarulasolutions.com>",
    "date": "2026-04-19T14:31:46",
    "name": "[v4,6/8] fwu: add helper to get image GUID by type and bank index",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6ed968b63b0ec6f5bfc44d455267bd63a777899d",
    "submitter": {
        "id": 83038,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/83038/?format=api",
        "name": "Dario Binacchi",
        "email": "dario.binacchi@amarulasolutions.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260419143247.437733-7-dario.binacchi@amarulasolutions.com/mbox/",
    "series": [
        {
            "id": 500509,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/500509/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=500509",
            "date": "2026-04-19T14:31:40",
            "name": "Support metadata-driven A/B boot for STM32MP25",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/500509/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2224917/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2224917/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com\n header.a=rsa-sha256 header.s=google header.b=nNVCSNZR;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=amarulasolutions.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com\n header.b=\"nNVCSNZR\";\n\tdkim-atps=neutral",
            "phobos.denx.de; dmarc=pass (p=none dis=none)\n header.from=amarulasolutions.com",
            "phobos.denx.de; spf=pass\n smtp.mailfrom=dario.binacchi@amarulasolutions.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzB271g9cz1yGt\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 00:33:51 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 58CE8842D2;\n\tSun, 19 Apr 2026 16:33:10 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id C010E842E7; Sun, 19 Apr 2026 16:33:08 +0200 (CEST)",
            "from mail-wm1-x331.google.com (mail-wm1-x331.google.com\n [IPv6:2a00:1450:4864:20::331])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id C820483B99\n for <u-boot@lists.denx.de>; Sun, 19 Apr 2026 16:33:06 +0200 (CEST)",
            "by mail-wm1-x331.google.com with SMTP id\n 5b1f17b1804b1-488b8bc6bc9so14596085e9.3\n for <u-boot@lists.denx.de>; Sun, 19 Apr 2026 07:33:06 -0700 (PDT)",
            "from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it\n (host-79-20-97-39.retail.telecomitalia.it. [79.20.97.39])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488fb755938sm86864245e9.3.2026.04.19.07.33.04\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 19 Apr 2026 07:33:05 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=amarulasolutions.com; s=google; t=1776609186; x=1777213986;\n darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=35oH3mslwLGRRway1ir7K30i9wTZHNIramSRlzIVcYQ=;\n b=nNVCSNZR1VlzcJRz33qjUOSYXAIRPl/IlhSyeyneYPL12WPEgUR8pnz6AQjMqNxv19\n p5re5ZtaMjaxq5BFOcIwoOG/s90QOrKWMrm9ZS7EJusgMirqmZDQOT1igKOHMyNl9Mmq\n TKmbOrSFcvpYegEXS5PWj22NOo+TRH5HtbMUg=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776609186; x=1777213986;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=35oH3mslwLGRRway1ir7K30i9wTZHNIramSRlzIVcYQ=;\n b=YzLJAC5FhNRw7o04ZrG/5eNNafT2RnJEM87mCqGysnowtUdDbBoOTCxbu2PhV99Kfj\n 9ARWcAkerAzTHSoxY51puvAbrdOqj/alkpF5U/11z+OgId+SgHx2PFMKUipEGmcEmifh\n +dmTskYgdftBmq9E3rqjd2dP/rajcQyf8X45bSoFrU92onaXCnw9fh6cV7MDOwBD56PL\n pHvpy7mzBnzzjp2xiAHAUSvy/Ap4M5T85kb35XiIYsc6kUDTzMqxmug0N6K/mZACaJvS\n 55ciUm5RYqsA5lKAi0lu0alvO5iXi26Pjs7CBB4IQeoJoargD7eyE+toiYB6OgZbrNHk\n fdCg==",
        "X-Gm-Message-State": "AOJu0YyRw6r3e2+1mcYMk0ebSoia5x7rSqBqC2BpFu5cknhpJckQcL0x\n WgOUvcxyHJHPwRdHjjn6cA3eFujNGjgnLJ/1tpHKLT0mehUkg3R92dZh7V4ZNLp6JI4cN6HcgWH\n ZFB/g",
        "X-Gm-Gg": "AeBDietazyWsV1k41hEKEj7JRERi9CEBnDyFos95VuXX6suXJHZGye4hkFTAbq4/BgS\n rCxJqQ64v/7hpwz45hf+qGYjTjxhQesEqWSo0jr7bPnrhDR/nTCC9lrMtaSE+IwWoAZNxyruizH\n 7nnuAdguabjrRG5OirBTIYSgaICNpSueSZOk6u4p4tDV0XUxq2lwHemLkUCL+SLaj+Tl3B8fF/A\n zn263nPdMyjnugNimgif4UD7GAOo50/Rbu39VAvza1mz/m3SVux1OumnvLmAppjp/DMN65fZBUq\n yEGRc4j5FCA/dUWHYrrC86bFfHnOu4sf2WX/ARjqMavwa/iv591PFN8wb17q98/AuRugKGN12w9\n YneoOGfLbTwpddsPy411LqHcfOUH/w+5ijTK4JFJ7w3qzGCeVUzOiEXgmQLL1zeUfq6q2oc6+qe\n SZxY4V7YUS34EvXqsqayJDOAVFX9I2bZDAvhb0a1yooTDdXQudcLw6rtw38JXWrfDuunesZTXg7\n BQU1MHI9txxHhmmC0thN1x5VCUNXljCzkUCRbdzU+CNf2a3Rwf9hCDNMaVLkKjTwhdvf92F729p\n jRCLUlhNlXBUHb6sV0cvnDWH8GeFinmu",
        "X-Received": "by 2002:a05:600c:4e16:b0:488:d6eb:e63a with SMTP id\n 5b1f17b1804b1-488fb76fe73mr140754565e9.14.1776609185929;\n Sun, 19 Apr 2026 07:33:05 -0700 (PDT)",
        "From": "Dario Binacchi <dario.binacchi@amarulasolutions.com>",
        "To": "u-boot@lists.denx.de",
        "Cc": "linux-amarula@amarulasolutions.com,\n Dario Binacchi <dario.binacchi@amarulasolutions.com>,\n Simon Glass <sjg@chromium.org>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Kory Maincent <kory.maincent@bootlin.com>,\n Michal Simek <michal.simek@amd.com>,\n Padmarao Begari <padmarao.begari@amd.com>,\n Sughosh Ganu <sughosh.ganu@arm.com>, Tom Rini <trini@konsulko.com>",
        "Subject": "[PATCH v4 6/8] fwu: add helper to get image GUID by type and bank\n index",
        "Date": "Sun, 19 Apr 2026 16:31:46 +0200",
        "Message-ID": "<20260419143247.437733-7-dario.binacchi@amarulasolutions.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260419143247.437733-1-dario.binacchi@amarulasolutions.com>",
        "References": "<20260419143247.437733-1-dario.binacchi@amarulasolutions.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "Introduce fwu_mdata_get_image_guid() to retrieve a specific image GUID\nfrom the FWU metadata based on the bank index and image type GUID.\n\nThis allows identifying the correct partition in multi-bank (A/B)\nscenarios, ensuring the correct image is targeted depending on the\ncurrent bank.\n\nSigned-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>\nReviewed-by: Simon Glass <sjg@chromium.org>\n\n---\n\nChanges in v4:\n- Add Reviewed-by of Simon Glass\n\nChanges in v3:\n- Add kerneldoc comment for fwu_mdata_get_image_guid() above its\n  declaration in fwu.h.\n\nChanges in v2:\n- Add kerneldoc comment for fwu_mdata_get_image_guid().\n- Pass efi_guid_t by pointer for consistency.\n\n include/fwu.h         | 11 +++++++++++\n lib/fwu_updates/fwu.c | 33 +++++++++++++++++++++++++++++++++\n 2 files changed, 44 insertions(+)",
    "diff": "diff --git a/include/fwu.h b/include/fwu.h\nindex 9cee8fb085cb..68a51fb4296b 100644\n--- a/include/fwu.h\n+++ b/include/fwu.h\n@@ -396,6 +396,17 @@ void fwu_populate_mdata_image_info(struct fwu_data *data);\n  */\n int fwu_get_mdata_size(uint32_t *mdata_size);\n \n+/**\n+ * fwu_mdata_get_image_guid() - Get image GUID for a type and bank\n+ * @image_guid: Pointer to be filled with the found image GUID\n+ * @image_type_guid: Pointer to the image type GUID to search for\n+ * @bank_index: Index of the bank\n+ *\n+ * Return: 0 if OK, -ve on error\n+ */\n+int fwu_mdata_get_image_guid(efi_guid_t *image_guid,\n+\t\t\t     const efi_guid_t *image_type_guid, u32 bank_index);\n+\n /**\n  * fwu_state_machine_updates() - Update FWU state of the platform\n  * @state: FWU bank state\ndiff --git a/lib/fwu_updates/fwu.c b/lib/fwu_updates/fwu.c\nindex e82600a29a40..2b11e5da061d 100644\n--- a/lib/fwu_updates/fwu.c\n+++ b/lib/fwu_updates/fwu.c\n@@ -243,6 +243,39 @@ int fwu_sync_mdata(struct fwu_mdata *mdata, int part)\n \treturn 0;\n }\n \n+/**\n+ * fwu_mdata_get_image_guid() - Get image GUID for a type and bank\n+ * @image_guid: Pointer to be filled with the found image GUID\n+ * @image_type_guid: Pointer to the image type GUID to search for\n+ * @bank_index: Index of the bank\n+ *\n+ * Return: 0 if OK, -ve on error\n+ */\n+int fwu_mdata_get_image_guid(efi_guid_t *image_guid,\n+\t\t\t     const efi_guid_t *image_type_guid, u32 bank_index)\n+{\n+\tstruct fwu_data *data = &g_fwu_data;\n+\tstruct fwu_image_entry *image;\n+\tint i;\n+\n+\tif (bank_index >= data->num_banks)\n+\t\treturn -EINVAL;\n+\n+\tfor (i = 0; i < data->num_images; i++) {\n+\t\timage = &data->fwu_images[i];\n+\n+\t\tif (!guidcmp(image_type_guid, &image->image_type_guid)) {\n+\t\t\tstruct fwu_image_bank_info *bank;\n+\n+\t\t\tbank = &image->img_bank_info[bank_index];\n+\t\t\tguidcpy(image_guid, &bank->image_guid);\n+\t\t\treturn 0;\n+\t\t}\n+\t}\n+\n+\treturn -ENOENT;\n+}\n+\n /**\n  * fwu_mdata_copies_allocate() - Allocate memory for metadata\n  * @mdata_size: Size of the metadata structure\n",
    "prefixes": [
        "v4",
        "6/8"
    ]
}