get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218749,
    "url": "http://patchwork.ozlabs.org/api/patches/2218749/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260401202844.673494-11-peterx@redhat.com/",
    "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": "<20260401202844.673494-11-peterx@redhat.com>",
    "list_archive_url": null,
    "date": "2026-04-01T20:28:43",
    "name": "[10/11] vmstate: Stop checking size for nullptr compression",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "3c6eceeb1e8522ffc1a1673f455983c2a951d057",
    "submitter": {
        "id": 67717,
        "url": "http://patchwork.ozlabs.org/api/people/67717/?format=api",
        "name": "Peter Xu",
        "email": "peterx@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260401202844.673494-11-peterx@redhat.com/mbox/",
    "series": [
        {
            "id": 498385,
            "url": "http://patchwork.ozlabs.org/api/series/498385/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498385",
            "date": "2026-04-01T20:28:34",
            "name": "vmstate: Implement VMS_ARRAY_OF_POINTER_AUTO_ALLOC",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498385/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218749/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218749/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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=aJqXC1xH;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=aDcUyit9;\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 4fmGnn6ltqz1yGY\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 07:30:21 +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 1w82BU-0004Md-Hi; Wed, 01 Apr 2026 16:29:04 -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 <peterx@redhat.com>) id 1w82BT-0004MG-E7\n for qemu-devel@nongnu.org; Wed, 01 Apr 2026 16:29:03 -0400",
            "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <peterx@redhat.com>) id 1w82BS-00039h-2p\n for qemu-devel@nongnu.org; Wed, 01 Apr 2026 16:29:03 -0400",
            "from mail-qk1-f199.google.com (mail-qk1-f199.google.com\n [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-125-qZij9Bx5Pm6xHJpG43NQpg-1; Wed, 01 Apr 2026 16:29:00 -0400",
            "by mail-qk1-f199.google.com with SMTP id\n af79cd13be357-8cd849cd562so69954085a.0\n for <qemu-devel@nongnu.org>; Wed, 01 Apr 2026 13:29:00 -0700 (PDT)",
            "from x1.com ([142.189.10.167]) by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8d2a548a4efsm68194085a.8.2026.04.01.13.28.58\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 01 Apr 2026 13:28:58 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775075341;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=y9nFC8fExKGiU5GjHp52oB/dVp37pPXgo7vivdw5CVw=;\n b=aJqXC1xHk2LfuF9kulirMN90aDc+4NQBFdE8NzdILo3hRBnSh0K8dXrR/OvHoICuOjPKeI\n 7jqTZiclCUjampUdl/Feck+s7UDx+z7Oal5NG6nv98ColgyILfI2UxbF12eki6Sw7R2fC7\n XW1d4Uiomi9Pv/oDfxfAa0uBEMN8rxE=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1775075340; x=1775680140; 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=y9nFC8fExKGiU5GjHp52oB/dVp37pPXgo7vivdw5CVw=;\n b=aDcUyit9vTfmsUQbgrzSbKUOaG39xzbt37CGir2rVQWTveJGkzfCbmtTXFWpJQwuLX\n CEdxosNcKCeM6y0Prxag5demdtFhi15dDSAcONJ6p8DD3qcnNwrq884jha8sh4Hjd8eD\n AFhrMYNORad/enPjToBmJhbOfV6SAvM/au5nfNxENepO0UsVqGmCWbrE2h1BsWOH/ndq\n hES1q6BAUVqJsrE+ayVS+WdZSQIxeJSUBS8NDojT7qHkMaewlLEJWbaST2zmWOLzFKsx\n sIKbzcqDvqodkjkn72WBy2USFg24CQu2TxauK8E+ilago8rYNuRX3HXrfCRKjisHt00J\n 0wOg=="
        ],
        "X-MC-Unique": "qZij9Bx5Pm6xHJpG43NQpg-1",
        "X-Mimecast-MFC-AGG-ID": "qZij9Bx5Pm6xHJpG43NQpg_1775075340",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775075340; x=1775680140;\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=y9nFC8fExKGiU5GjHp52oB/dVp37pPXgo7vivdw5CVw=;\n b=MXg1RIsbAb4+PWOvJIFqAOZMEv/ImXggqox++5RaRxGzvFmffcOPt1grMl6aJaZpOO\n zz0E9NX3m5Id0eq1d/rYGun5PjAaGu2TUVFmE9l0asZiZNswTjCIKrKz02obW8bLoyao\n 282Llcenxjyb7pLvrEADOOkIrIvdjNKbXFZyLBLh2C4uk4sta7vRgKUTORt48hXrx6pm\n jjTDe7/22loKffhTIwdPLmk9fiped6dBNE7aklNaq9AenYOri6EevCWdAmsxeqC878P2\n +pxYUKewgOOWgSj3N5CerwSaBPrkzgYNju5BC1CEavpEZnkfRt2nOZdny1Wk2mzqbQdg\n gHvg==",
        "X-Gm-Message-State": "AOJu0Yxv69BZ0+PRiufzCSToWM0ZDM2kcLyKFcnvTM4b0xVu8Zrnr7JM\n jVRvtwN8h8sTnNnRauHECU3B9PBq0h5Vx628NvBDnEOafgQ0HARng9KJQKs0/PW5qjhe+ois8Gk\n R6bMyBfAEZVF5DtmjDJKjXSYQ7FqUy17P9oveF95iD6ozTH/imuFUhF0Lu6htAnmN1lYnbwltMs\n zq6bzyehDhsQmvNPDdsLIHQ3vrOoVyXvo+I8mRag==",
        "X-Gm-Gg": "ATEYQzzA1D6wkzQAdXMWuwdXhkEyv1+h21KiW0jVtdW/k96c7yCW/EhmEG27pH5U+nS\n ZRekedCpAUHH4E+8APhTLthC5hmO+nrX/93RD3TTmoZsiS+U/rRFSlVQ+9NbqqfCjm6ds+wSmuP\n inGJk0wPn+xxFfqokpQQwV7tWQEbQIVvzVwfFfb0lvv/MyxiKeKz9km4agjQjwkJCFdGHF+DPVg\n Y2DKDwLTEzpN9j7/duKp1qaX1+/nKi/xXV2ucD5TV7m1ducb37QqNPXud4HafKvCFVlB+LGmkUe\n jZ2t7VY7Klts1Srykk8v3kPXnJD2XpsEoSt/P3u4HqJH8x/6SLyWyphNLrcCGPCT5O3mzTBcq5S\n mHIWG1HNJTBuVTptWzNutcQapGMIWKeVhnm/S1JuP/Wc=",
        "X-Received": [
            "by 2002:a05:620a:400f:b0:8cf:d565:fcbb with SMTP id\n af79cd13be357-8d1b5a994b6mr766590985a.11.1775075339442;\n Wed, 01 Apr 2026 13:28:59 -0700 (PDT)",
            "by 2002:a05:620a:400f:b0:8cf:d565:fcbb with SMTP id\n af79cd13be357-8d1b5a994b6mr766585985a.11.1775075338860;\n Wed, 01 Apr 2026 13:28:58 -0700 (PDT)"
        ],
        "From": "Peter Xu <peterx@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Juraj Marcin <jmarcin@redhat.com>,\n Alexander Mikhalitsyn <alexander@mihalicyn.com>,\n Fabiano Rosas <farosas@suse.de>, Peter Xu <peterx@redhat.com>,\n Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>",
        "Subject": "[PATCH 10/11] vmstate: Stop checking size for nullptr compression",
        "Date": "Wed,  1 Apr 2026 16:28:43 -0400",
        "Message-ID": "<20260401202844.673494-11-peterx@redhat.com>",
        "X-Mailer": "git-send-email 2.50.1",
        "In-Reply-To": "<20260401202844.673494-1-peterx@redhat.com>",
        "References": "<20260401202844.673494-1-peterx@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com",
        "X-Spam_score_int": "-6",
        "X-Spam_score": "-0.7",
        "X-Spam_bar": "/",
        "X-Spam_report": "(-0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1,\n SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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": "From: Fabiano Rosas <farosas@suse.de>\n\nThe NULL pointer marker code applies only to VMS_ARRAY_OF_POINTER,\nwhere the size is never NULL. Move the setting of is_null under\nVMS_ARRAY_OF_POINTER, so we can stop checking the size.\n\nSigned-off-by: Fabiano Rosas <farosas@suse.de>\nReviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>\nSigned-off-by: Peter Xu <peterx@redhat.com>\n---\n migration/vmstate.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/migration/vmstate.c b/migration/vmstate.c\nindex de2ad822e8..2f13b48a37 100644\n--- a/migration/vmstate.c\n+++ b/migration/vmstate.c\n@@ -682,14 +682,14 @@ static bool vmstate_save_vmsd_v(QEMUFile *f, const VMStateDescription *vmsd,\n                 const VMStateField *inner_field;\n                 /* maximum number of elements to compress in the JSON blob */\n                 int max_elems = vmsd_can_compress(field) ? (n_elems - i) : 1;\n-                bool use_marker_field, is_null;\n+                bool use_marker_field, is_null = false;\n \n                 if (field->flags & VMS_ARRAY_OF_POINTER) {\n                     assert(curr_elem);\n                     curr_elem = *(void **)curr_elem;\n+                    is_null = !curr_elem;\n                 }\n \n-                is_null = !curr_elem && size;\n                 use_marker_field = use_dynamic_array || is_null;\n \n                 if (use_marker_field) {\n@@ -717,7 +717,7 @@ static bool vmstate_save_vmsd_v(QEMUFile *f, const VMStateDescription *vmsd,\n \n                     for (int j = i + 1; j < n_elems; j++) {\n                         void *elem = *(void **)(first_elem + size * j);\n-                        bool elem_is_null = !elem && size;\n+                        bool elem_is_null = !elem;\n \n                         if (is_null != elem_is_null) {\n                             max_elems = j - i;\n",
    "prefixes": [
        "10/11"
    ]
}