get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2196439,
    "url": "http://patchwork.ozlabs.org/api/patches/2196439/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260213225254.2544596-2-raymondmaoca@gmail.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/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,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260213225254.2544596-2-raymondmaoca@gmail.com>",
    "list_archive_url": null,
    "date": "2026-02-13T22:52:46",
    "name": "[v6,1/6] smbios: Fix duplicated smbios handles",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "3d0d3b751b179af1707c86940e27320759a04a7f",
    "submitter": {
        "id": 91989,
        "url": "http://patchwork.ozlabs.org/api/people/91989/?format=api",
        "name": "Raymond Mao",
        "email": "raymondmaoca@gmail.com"
    },
    "delegate": {
        "id": 3651,
        "url": "http://patchwork.ozlabs.org/api/users/3651/?format=api",
        "username": "trini",
        "first_name": "Tom",
        "last_name": "Rini",
        "email": "trini@ti.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260213225254.2544596-2-raymondmaoca@gmail.com/mbox/",
    "series": [
        {
            "id": 492145,
            "url": "http://patchwork.ozlabs.org/api/series/492145/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=492145",
            "date": "2026-02-13T22:52:45",
            "name": "Implement all missing SMBIOS types required by distro tooling",
            "version": 6,
            "mbox": "http://patchwork.ozlabs.org/series/492145/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196439/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196439/checks/",
    "tags": {},
    "related": [],
    "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 (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=c8ny8IFg;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; 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=gmail.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.b=\"c8ny8IFg\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=raymondmaoca@gmail.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de [85.214.62.61])\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 4fCSBY6TRdz1xvS\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 09:53:25 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id B643283CF2;\n\tFri, 13 Feb 2026 23:53:21 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 4454C83015; Fri, 13 Feb 2026 23:53:21 +0100 (CET)",
            "from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com\n [IPv6:2607:f8b0:4864:20::82e])\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 9FBBE83CF2\n for <u-boot@lists.denx.de>; Fri, 13 Feb 2026 23:53:18 +0100 (CET)",
            "by mail-qt1-x82e.google.com with SMTP id\n d75a77b69052e-502acd495feso14846731cf.2\n for <u-boot@lists.denx.de>; Fri, 13 Feb 2026 14:53:18 -0800 (PST)",
            "from ubuntu.localdomain (174-138-202-16.cpe.distributel.net.\n [174.138.202.16]) by smtp.gmail.com with ESMTPSA id\n d75a77b69052e-506847ed9c4sm72845731cf.8.2026.02.13.14.53.16\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 13 Feb 2026 14:53:17 -0800 (PST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD,FREEMAIL_FROM,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=no\n autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1771023197; x=1771627997; 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=l2c1f2hmBrJkskgvPshBZwnOj63EEDYt2WYn12Ztcoc=;\n b=c8ny8IFgaWrxZ/i3Lu5i9wkaXlZjEK8KlfpRzEtzjTEBPkdcm7txo9nNjtMQdAMj2v\n N0Zz4I4AxIwXfs2llVnqn7tkLSTlXRumCW/QvSZssvSPkw3QMdr1+hHh7dBBS6yFqSY7\n mYnwUsuMi+u2Ji8Ba6V1zHUKIoZco2D13xvkbTqN8uyDLK9p9mNGd/eSoxZPWidVKs4o\n 04n6N1jsZHfLlaiifLAi2gyOhYoOg5RrwnYcOL5rmUsga1szDrokwrwbP3va18LuA7yB\n 0M2dT8Bo9eGZdlA+Xii1jOj5InkFfESazpFdrhw4KPeXANTsyNgTGj3Rwi76Q7xbnQN2\n nYIQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771023197; x=1771627997;\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=l2c1f2hmBrJkskgvPshBZwnOj63EEDYt2WYn12Ztcoc=;\n b=QFL0nWVmfA0Y77C6DXHl1uwHXi2bb6+EpHvsvUIv79tRXOlszdsM0qvSt45a5cWLSd\n IMlLYXMngV4g/TpSb876MSABWxrkM0/F3ejb/aH0uTi2I5I+dY2O91qyEhbaVjGhBIPm\n fKx5ZdVIHpS/p+rJ81Of0FQRNWAAB9EyVGUjHsHvtTxmKjyOcyx7plYS7QE9+KdlU/C/\n AJsShTrTacTk9E9dkqu8R5GMAAVlcMROhuZFVvg+U7nTyp/BGpERdN1Ls5TUD7rijjn6\n S3ilgX0nItWWKEtCLBMKwHBkLJByV0n7yBpbeBxRxHwn/iWL22RvtKYJ1yUjuYmWegb8\n Ly8w==",
        "X-Gm-Message-State": "AOJu0YzFM6bgGoK5nhKcb/0oL/WAxtoUSYz4eh7Vjm1vvEeZ/Po+n2qI\n E4o4qjVdqA6pGNHYUImB++Yy6xvZAX5jzbtbj92VnWSFxLWo+Exo44FPAYw08Q==",
        "X-Gm-Gg": "AZuq6aKlrGnwSt6I9hKC7bdDDXDjXY+bs89Dp5qPZtDYXq4AfWEDN8TtRFmccJk9jwR\n Nh6FxYXKx1j6cePIPRfOwnbCLL2QneD/05JJC0VxJg0g6GIm6kYajmuTZFAW1WA5oZWVG+N5tBc\n GjLZNRiNjJyHqbl24ekez/+3qrcy+a8XKVTPRdr8bCq9A1asZaWXusPE3dI8yfxt09lX34g3REK\n 1r81pCGZ69V+nLdLcUH4viEArZldSPS1tXfBAnzsUwCYz0ErjjuTWBMJtoD9lJhsiu9PrIBl8Ts\n XKL0PSe6/J7EbIXmMeSJFpHV4HExeMS01k7eH5Wsp1ohn4i3ZvxhEkAOxjq1//U9u98qTKA4JN8\n o4KJ0zw4Sybn23Z5m0nQ9/ekLiGDVi89VYZI8orn6ROAZzaYoneStkX+bXXszzAJIdFNbbllXRC\n BOq+yP0b0CkNnbK6n82H45KQGg1zBkIoALkciQdWwECU+XGR8hkHuztaucdjq6PVBaxDJ/uPrW4\n 2M6+f80iGIpALdWs/h+LA==",
        "X-Received": "by 2002:a05:622a:1190:b0:501:5113:da4b with SMTP id\n d75a77b69052e-506b4032ab2mr15657361cf.71.1771023197373;\n Fri, 13 Feb 2026 14:53:17 -0800 (PST)",
        "From": "Raymond Mao <raymondmaoca@gmail.com>",
        "To": "u-boot@lists.denx.de",
        "Cc": "Raymond Mao <raymondmaoca@gmail.com>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Tom Rini <trini@konsulko.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>,\n Mark Kettenis <kettenis@openbsd.org>,\n Baocheng Su <baocheng.su@siemens.com>, Jan Kiszka <jan.kiszka@siemens.com>,\n Li Hua Qian <huaqian.li@siemens.com>,\n Samuel Holland <samuel.holland@sifive.com>",
        "Subject": "[PATCH v6 1/6] smbios: Fix duplicated smbios handles",
        "Date": "Fri, 13 Feb 2026 17:52:46 -0500",
        "Message-Id": "<20260213225254.2544596-2-raymondmaoca@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20260213225254.2544596-1-raymondmaoca@gmail.com>",
        "References": "<20260213225254.2544596-1-raymondmaoca@gmail.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": "Some smbios types can have multiple instances (e.g. Type 7, 9, 16, 17,\n19), thus the 'handle' argument should be a pointer so that the value\ncan be accumulated when writing all the instances.\nThis also fix the observed duplicated Type 7 handles.\n\nFixes: bcf456dd369e (\"smbios: add detailed smbios information\")\nSigned-off-by: Raymond Mao <raymondmaoca@gmail.com>\nReviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>\n---\nChanges in v3:\n- Initial patch.\nChanges in v4:\n- None.\nChanges in v5:\n- None.\nChanges in v6:\n- None.\n\n lib/smbios.c | 42 +++++++++++++++++++++++-------------------\n 1 file changed, 23 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/lib/smbios.c b/lib/smbios.c\nindex b8c2846277a..85508c06547 100644\n--- a/lib/smbios.c\n+++ b/lib/smbios.c\n@@ -103,7 +103,7 @@ struct smbios_ctx {\n  * @ctx:\tcontext for writing the tables\n  * Return:\tsize of the structure\n  */\n-typedef int (*smbios_write_type)(ulong *addr, int handle,\n+typedef int (*smbios_write_type)(ulong *addr, int *handle,\n \t\t\t\t struct smbios_ctx *ctx);\n \n /**\n@@ -364,7 +364,7 @@ static int smbios_string_table_len(const struct smbios_ctx *ctx)\n \treturn (ctx->next_ptr + 1) - ctx->eos;\n }\n \n-static int smbios_write_type0(ulong *current, int handle,\n+static int smbios_write_type0(ulong *current, int *handle,\n \t\t\t      struct smbios_ctx *ctx)\n {\n \tstruct smbios_type0 *t;\n@@ -372,7 +372,7 @@ static int smbios_write_type0(ulong *current, int handle,\n \n \tt = map_sysmem(*current, len);\n \tmemset(t, 0, len);\n-\tfill_smbios_header(t, SMBIOS_BIOS_INFORMATION, len, handle);\n+\tfill_smbios_header(t, SMBIOS_BIOS_INFORMATION, len, *handle);\n \tsmbios_set_eos(ctx, t->eos);\n \tt->vendor = smbios_add_prop_si(ctx, NULL, SYSID_SM_BIOS_VENDOR,\n \t\t\t\t       \"U-Boot\");\n@@ -423,7 +423,7 @@ static int smbios_write_type0(ulong *current, int handle,\n \treturn len;\n }\n \n-static int smbios_write_type1(ulong *current, int handle,\n+static int smbios_write_type1(ulong *current, int *handle,\n \t\t\t      struct smbios_ctx *ctx)\n {\n \tstruct smbios_type1 *t;\n@@ -434,7 +434,7 @@ static int smbios_write_type1(ulong *current, int handle,\n \n \tt = map_sysmem(*current, len);\n \tmemset(t, 0, len);\n-\tfill_smbios_header(t, SMBIOS_SYSTEM_INFORMATION, len, handle);\n+\tfill_smbios_header(t, SMBIOS_SYSTEM_INFORMATION, len, *handle);\n \tsmbios_set_eos(ctx, t->eos);\n \n \tt->manufacturer = smbios_add_prop_si(ctx, \"manufacturer\",\n@@ -471,7 +471,7 @@ static int smbios_write_type1(ulong *current, int handle,\n \treturn len;\n }\n \n-static int smbios_write_type2(ulong *current, int handle,\n+static int smbios_write_type2(ulong *current, int *handle,\n \t\t\t      struct smbios_ctx *ctx)\n {\n \tstruct smbios_type2 *t;\n@@ -485,7 +485,7 @@ static int smbios_write_type2(ulong *current, int handle,\n \t */\n \tt = map_sysmem(*current, len);\n \tmemset(t, 0, len);\n-\tfill_smbios_header(t, SMBIOS_BOARD_INFORMATION, len, handle);\n+\tfill_smbios_header(t, SMBIOS_BOARD_INFORMATION, len, *handle);\n \n \t/* eos is at the end of the structure */\n \teos_addr = (u8 *)t + len - sizeof(t->eos);\n@@ -519,7 +519,7 @@ static int smbios_write_type2(ulong *current, int handle,\n \t * t->number_contained_objects = <obj_handle_num>;\n \t */\n \n-\tt->chassis_handle = handle + 1;\n+\tt->chassis_handle = *handle + 1;\n \n \tlen = t->hdr.length + smbios_string_table_len(ctx);\n \t*current += len;\n@@ -528,7 +528,7 @@ static int smbios_write_type2(ulong *current, int handle,\n \treturn len;\n }\n \n-static int smbios_write_type3(ulong *current, int handle,\n+static int smbios_write_type3(ulong *current, int *handle,\n \t\t\t      struct smbios_ctx *ctx)\n {\n \tstruct smbios_type3 *t;\n@@ -548,7 +548,7 @@ static int smbios_write_type3(ulong *current, int handle,\n \n \tt = map_sysmem(*current, len);\n \tmemset(t, 0, len);\n-\tfill_smbios_header(t, SMBIOS_SYSTEM_ENCLOSURE, len, handle);\n+\tfill_smbios_header(t, SMBIOS_SYSTEM_ENCLOSURE, len, *handle);\n #if IS_ENABLED(CONFIG_GENERATE_SMBIOS_TABLE_VERBOSE)\n \telem_addr = (u8 *)t + offsetof(struct smbios_type3, sku_number);\n \tsku_num_addr = elem_addr + elem_size;\n@@ -669,7 +669,7 @@ static void smbios_write_type4_dm(struct smbios_type4 *t,\n #endif\n }\n \n-static int smbios_write_type4(ulong *current, int handle,\n+static int smbios_write_type4(ulong *current, int *handle,\n \t\t\t      struct smbios_ctx *ctx)\n {\n \tstruct smbios_type4 *t;\n@@ -679,7 +679,7 @@ static int smbios_write_type4(ulong *current, int handle,\n \n \tt = map_sysmem(*current, len);\n \tmemset(t, 0, len);\n-\tfill_smbios_header(t, SMBIOS_PROCESSOR_INFORMATION, len, handle);\n+\tfill_smbios_header(t, SMBIOS_PROCESSOR_INFORMATION, len, *handle);\n \tsmbios_set_eos(ctx, t->eos);\n \tt->socket_design = smbios_add_prop_si(ctx, \"socket-design\",\n \t\t\t\t\t      SYSID_SM_PROCESSOR_SOCKET, NULL);\n@@ -828,13 +828,14 @@ static int smbios_write_type7_1level(ulong *current, int handle,\n \treturn len;\n }\n \n-static int smbios_write_type7(ulong *current, int handle,\n+static int smbios_write_type7(ulong *current, int *handle,\n \t\t\t      struct smbios_ctx *ctx)\n {\n \tint len = 0;\n \tint i, level;\n \tofnode parent = ctx->node;\n \tstruct smbios_ctx ctx_bak;\n+\tint hdl_base = *handle;\n \n \tmemcpy(&ctx_bak, ctx, sizeof(ctx_bak));\n \n@@ -850,15 +851,17 @@ static int smbios_write_type7(ulong *current, int handle,\n \t\t\treturn 0;\n \t\tctx->subnode_name = buf;\n \t\tctx->node = ofnode_find_subnode(parent, ctx->subnode_name);\n-\t\tlen += smbios_write_type7_1level(current, handle++, ctx, i);\n+\t\t*handle = hdl_base + i;\n+\t\tlen += smbios_write_type7_1level(current, *handle, ctx, i);\n \t\tmemcpy(ctx, &ctx_bak, sizeof(*ctx));\n \t}\n+\n \treturn len;\n }\n \n #endif /* #if IS_ENABLED(CONFIG_GENERATE_SMBIOS_TABLE_VERBOSE) */\n \n-static int smbios_write_type32(ulong *current, int handle,\n+static int smbios_write_type32(ulong *current, int *handle,\n \t\t\t       struct smbios_ctx *ctx)\n {\n \tstruct smbios_type32 *t;\n@@ -866,7 +869,7 @@ static int smbios_write_type32(ulong *current, int handle,\n \n \tt = map_sysmem(*current, len);\n \tmemset(t, 0, len);\n-\tfill_smbios_header(t, SMBIOS_SYSTEM_BOOT_INFORMATION, len, handle);\n+\tfill_smbios_header(t, SMBIOS_SYSTEM_BOOT_INFORMATION, len, *handle);\n \tsmbios_set_eos(ctx, t->eos);\n \n \t*current += len;\n@@ -875,7 +878,7 @@ static int smbios_write_type32(ulong *current, int handle,\n \treturn len;\n }\n \n-static int smbios_write_type127(ulong *current, int handle,\n+static int smbios_write_type127(ulong *current, int *handle,\n \t\t\t\tstruct smbios_ctx *ctx)\n {\n \tstruct smbios_type127 *t;\n@@ -883,7 +886,7 @@ static int smbios_write_type127(ulong *current, int handle,\n \n \tt = map_sysmem(*current, len);\n \tmemset(t, 0, len);\n-\tfill_smbios_header(t, SMBIOS_END_OF_TABLE, len, handle);\n+\tfill_smbios_header(t, SMBIOS_END_OF_TABLE, len, *handle);\n \n \t*current += len;\n \tunmap_sysmem(t);\n@@ -954,7 +957,8 @@ ulong write_smbios_table(ulong addr)\n \t\t\t\tctx.node = ofnode_find_subnode(parent_node,\n \t\t\t\t\t\t\t       method->subnode_name);\n \t\t}\n-\t\tlen += method->write((ulong *)&addr, handle++, &ctx);\n+\t\tlen += method->write((ulong *)&addr, &handle, &ctx);\n+\t\thandle++;\n \t}\n \n \t/*\n",
    "prefixes": [
        "v6",
        "1/6"
    ]
}