get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216120,
    "url": "http://patchwork.ozlabs.org/api/patches/2216120/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260325211728.89204-10-philmd@linaro.org/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260325211728.89204-10-philmd@linaro.org>",
    "list_archive_url": null,
    "date": "2026-03-25T21:17:27",
    "name": "[PATCH-for-11.1,09/10] target/sparc: Replace VMSTATE_VARRAY_MULTIPLY -> VMSTATE_UINTTL_ARRAY",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6608de2afeddf2cc587f932bc0ed736064d2c817",
    "submitter": {
        "id": 85046,
        "url": "http://patchwork.ozlabs.org/api/people/85046/?format=api",
        "name": "Philippe Mathieu-Daudé",
        "email": "philmd@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260325211728.89204-10-philmd@linaro.org/mbox/",
    "series": [
        {
            "id": 497512,
            "url": "http://patchwork.ozlabs.org/api/series/497512/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=497512",
            "date": "2026-03-25T21:17:19",
            "name": "migration: Reduce uses of target-specific macros",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497512/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216120/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216120/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "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=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=S/YXUGD6;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fh0Cg5lTSz1y1G\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 08:19:27 +1100 (AEDT)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1w5Vcf-0001dv-1D; Wed, 25 Mar 2026 17:18:41 -0400",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1w5Vcd-0001cs-T7\n for qemu-devel@nongnu.org; Wed, 25 Mar 2026 17:18:39 -0400",
            "from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1w5Vca-0001qw-R5\n for qemu-devel@nongnu.org; Wed, 25 Mar 2026 17:18:39 -0400",
            "by mail-wr1-x42c.google.com with SMTP id\n ffacd0b85a97d-43b4f48c47cso203710f8f.0\n for <qemu-devel@nongnu.org>; Wed, 25 Mar 2026 14:18:36 -0700 (PDT)",
            "from localhost.localdomain (88-187-86-199.subs.proxad.net.\n [88.187.86.199]) by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43b9192e3e8sm2917709f8f.5.2026.03.25.14.18.33\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Wed, 25 Mar 2026 14:18:34 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1774473515; x=1775078315; darn=nongnu.org;\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=sYLEjfbOiczTZUFDQRpJ1WZc2p5N+UskvmbNC3BaZgI=;\n b=S/YXUGD6YXLJjanHRcE+nmVClXdBBIv+shjUwLVqpzHsjSCWOIurU23J3IHKTG6HIz\n uhvIPwqkD+AhruLJ0pJ3f92H2HXBCGbABF6jFDZNwV0Mmt4TF1ytjsC+n6S5Kdf5u5Lj\n 2l608vgp7PdBM3ka0A9MM1ezJpvqw/lqoeghvr/WHWq86c6ADkE9xdWHIyjNIq0CKI9D\n 5Wm0GuFb9dZdF6BYZplUS7m5e+lGtTZTWsWoIirzLoemMdGteqROw7tyJ+JzUqUIO/a9\n Syg5OJlQBMgZyl4ggpALcHf8WUy0TY1+exvgbDxRu1rOOn8TCrkmDeiuGni9LEzsK1pJ\n ZjdQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774473515; x=1775078315;\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: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fbQQueRf/wHZj6uElHu/BJCS6XRKKB8Vnfwo3uwTWxZKjzmbj",
        "X-Received": "by 2002:a05:6000:2dc7:b0:439:b6d6:723 with SMTP id\n ffacd0b85a97d-43b88a1bcc5mr7764409f8f.42.1774473514778;\n Wed, 25 Mar 2026 14:18:34 -0700 (PDT)",
        "From": "=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Glenn Miles <milesg@linux.ibm.com>,\n Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n Nicholas Piggin <npiggin@gmail.com>, qemu-ppc@nongnu.org,\n Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,\n Fabiano Rosas <farosas@suse.de>, Alistair Francis <alistair.francis@wdc.com>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>,\n =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, qemu-riscv@nongnu.org,\n Paolo Bonzini <pbonzini@redhat.com>, Artyom Tarasenko <atar4qemu@gmail.com>,\n Anton Johansson <anjo@rev.ng>, Peter Xu <peterx@redhat.com>, =?utf-8?q?Phil?=\n\t=?utf-8?q?ippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>",
        "Subject": "[PATCH-for-11.1 09/10] target/sparc: Replace VMSTATE_VARRAY_MULTIPLY\n -> VMSTATE_UINTTL_ARRAY",
        "Date": "Wed, 25 Mar 2026 22:17:27 +0100",
        "Message-ID": "<20260325211728.89204-10-philmd@linaro.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260325211728.89204-1-philmd@linaro.org>",
        "References": "<20260325211728.89204-1-philmd@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2a00:1450:4864:20::42c;\n envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.google.com",
        "X-Spam_score_int": "-20",
        "X-Spam_score": "-2.1",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no",
        "X-Spam_action": "no action",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "VMSTATE_VARRAY_MULTIPLY() seems to be an \"optimized\" version\nof VMSTATE_UINTTL_ARRAY(), and is only used once. Prefer the\ngeneric macro, removing the need for the VMS_MULTIPLY_ELEMENTS\nfield.\n\nBump the SPARC CPU migration stream version.\n\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\n---\n include/migration/cpu.h     |  2 --\n include/migration/vmstate.h | 22 +++-------------------\n migration/vmstate.c         |  4 ----\n target/sparc/machine.c      |  7 +++----\n 4 files changed, 6 insertions(+), 29 deletions(-)",
    "diff": "diff --git a/include/migration/cpu.h b/include/migration/cpu.h\nindex ea411d863ad..05a1ddde343 100644\n--- a/include/migration/cpu.h\n+++ b/include/migration/cpu.h\n@@ -12,13 +12,11 @@\n     VMSTATE_UINT64_V(_f, _s, _v)\n #define VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, _v)                        \\\n     VMSTATE_UINT64_ARRAY_V(_f, _s, _n, _v)\n-#define vmstate_info_uinttl vmstate_info_uint64\n #else\n #define VMSTATE_UINTTL_V(_f, _s, _v)                                  \\\n     VMSTATE_UINT32_V(_f, _s, _v)\n #define VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, _v)                        \\\n     VMSTATE_UINT32_ARRAY_V(_f, _s, _n, _v)\n-#define vmstate_info_uinttl vmstate_info_uint32\n #endif\n \n #define VMSTATE_UINTTL(_f, _s)                                        \\\ndiff --git a/include/migration/vmstate.h b/include/migration/vmstate.h\nindex 62c2abd0c49..663b0c8ae06 100644\n--- a/include/migration/vmstate.h\n+++ b/include/migration/vmstate.h\n@@ -94,7 +94,7 @@ enum VMStateFlags {\n     VMS_ARRAY_OF_POINTER = 0x040,\n \n     /* The field is an array of variable size. The uint16_t at opaque\n-     * + VMStateField.num_offset (subject to VMS_MULTIPLY_ELEMENTS)\n+     * + VMStateField.num_offset\n      * contains the number of entries in the array. See the VMS_ARRAY\n      * description regarding array handling in general. May not be\n      * combined with VMS_ARRAY or any other VMS_VARRAY*. */\n@@ -115,14 +115,14 @@ enum VMStateFlags {\n     VMS_MULTIPLY         = 0x200,\n \n     /* The field is an array of variable size. The uint8_t at opaque +\n-     * VMStateField.num_offset (subject to VMS_MULTIPLY_ELEMENTS)\n+     * VMStateField.num_offset\n      * contains the number of entries in the array. See the VMS_ARRAY\n      * description regarding array handling in general. May not be\n      * combined with VMS_ARRAY or any other VMS_VARRAY*. */\n     VMS_VARRAY_UINT8     = 0x400,\n \n     /* The field is an array of variable size. The uint32_t at opaque\n-     * + VMStateField.num_offset (subject to VMS_MULTIPLY_ELEMENTS)\n+     * + VMStateField.num_offset\n      * contains the number of entries in the array. See the VMS_ARRAY\n      * description regarding array handling in general. May not be\n      * combined with VMS_ARRAY or any other VMS_VARRAY*. */\n@@ -139,12 +139,6 @@ enum VMStateFlags {\n      * cause the individual entries to be allocated. */\n     VMS_ALLOC            = 0x2000,\n \n-    /* Multiply the number of entries given by the integer at opaque +\n-     * VMStateField.num_offset (see VMS_VARRAY*) with VMStateField.num\n-     * to determine the number of entries in the array. Only valid in\n-     * combination with one of VMS_VARRAY*. */\n-    VMS_MULTIPLY_ELEMENTS = 0x4000,\n-\n     /* A structure field that is like VMS_STRUCT, but uses\n      * VMStateField.struct_version_id to tell which version of the\n      * structure we are referencing to use. */\n@@ -398,16 +392,6 @@ extern const VMStateInfo vmstate_info_qlist;\n     .offset     = vmstate_offset_2darray(_state, _field, _type, _n1, _n2),  \\\n }\n \n-#define VMSTATE_VARRAY_MULTIPLY(_field, _state, _field_num, _multiply, _info, _type) { \\\n-    .name       = (stringify(_field)),                               \\\n-    .num_offset = vmstate_offset_value(_state, _field_num, uint32_t),\\\n-    .num        = (_multiply),                                       \\\n-    .info       = &(_info),                                          \\\n-    .size       = sizeof(_type),                                     \\\n-    .flags      = VMS_VARRAY_UINT32|VMS_MULTIPLY_ELEMENTS,           \\\n-    .offset     = vmstate_offset_varray(_state, _field, _type),      \\\n-}\n-\n #define VMSTATE_SUB_ARRAY(_field, _state, _start, _num, _version, _info, _type) { \\\n     .name       = (stringify(_field)),                               \\\n     .version_id = (_version),                                        \\\ndiff --git a/migration/vmstate.c b/migration/vmstate.c\nindex 4d28364f7ba..e960bc7a7c4 100644\n--- a/migration/vmstate.c\n+++ b/migration/vmstate.c\n@@ -97,10 +97,6 @@ static int vmstate_n_elems(void *opaque, const VMStateField *field)\n         n_elems = *(uint8_t *)(opaque + field->num_offset);\n     }\n \n-    if (field->flags & VMS_MULTIPLY_ELEMENTS) {\n-        n_elems *= field->num;\n-    }\n-\n     trace_vmstate_n_elems(field->name, n_elems);\n     return n_elems;\n }\ndiff --git a/target/sparc/machine.c b/target/sparc/machine.c\nindex 0a449f2f8c6..5f402e098cf 100644\n--- a/target/sparc/machine.c\n+++ b/target/sparc/machine.c\n@@ -189,9 +189,9 @@ static int cpu_pre_save(void *opaque)\n  * versions are different.\n  */\n #ifndef TARGET_SPARC64\n-#define SPARC_VMSTATE_VER 7\n+#define SPARC_VMSTATE_VER 8\n #else\n-#define SPARC_VMSTATE_VER 9\n+#define SPARC_VMSTATE_VER 10\n #endif\n \n const VMStateDescription vmstate_sparc_cpu = {\n@@ -202,8 +202,7 @@ const VMStateDescription vmstate_sparc_cpu = {\n     .fields = (const VMStateField[]) {\n         VMSTATE_UINTTL_ARRAY(env.gregs, SPARCCPU, 8),\n         VMSTATE_UINT32(env.nwindows, SPARCCPU),\n-        VMSTATE_VARRAY_MULTIPLY(env.regbase, SPARCCPU, env.nwindows, 16,\n-                                vmstate_info_uinttl, target_ulong),\n+        VMSTATE_UINTTL_ARRAY(env.regbase, SPARCCPU, MAX_NWINDOWS * 16 + 8),\n         VMSTATE_CPUDOUBLE_ARRAY(env.fpr, SPARCCPU, TARGET_DPREGS),\n         VMSTATE_UINTTL(env.pc, SPARCCPU),\n         VMSTATE_UINTTL(env.npc, SPARCCPU),\n",
    "prefixes": [
        "PATCH-for-11.1",
        "09/10"
    ]
}