get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 812509,
    "url": "http://patchwork.ozlabs.org/api/patches/812509/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170911172022.4738-37-eblake@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": "<20170911172022.4738-37-eblake@redhat.com>",
    "list_archive_url": null,
    "date": "2017-09-11T17:20:20",
    "name": "[v7,36/38] libqtest: Merge qtest_memset() with qmemset()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "5556f8bc137bd362de3b509cb137d0664e34dd86",
    "submitter": {
        "id": 6591,
        "url": "http://patchwork.ozlabs.org/api/people/6591/?format=api",
        "name": "Eric Blake",
        "email": "eblake@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170911172022.4738-37-eblake@redhat.com/mbox/",
    "series": [
        {
            "id": 2534,
            "url": "http://patchwork.ozlabs.org/api/series/2534/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2534",
            "date": "2017-09-11T17:19:47",
            "name": "Preliminary libqtest cleanups",
            "version": 7,
            "mbox": "http://patchwork.ozlabs.org/series/2534/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/812509/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/812509/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@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)",
            "ext-mx05.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx05.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eblake@redhat.com"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrbC76bdYz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 03:53:55 +1000 (AEST)",
            "from localhost ([::1]:59504 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drSu9-0003yg-TY\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 13:53:53 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:39263)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1drSPd-0008W3-Si\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 13:22:23 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1drSPc-0001o9-IT\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 13:22:21 -0400",
            "from mx1.redhat.com ([209.132.183.28]:59876)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eblake@redhat.com>)\n\tid 1drSPX-0001kx-OA; Mon, 11 Sep 2017 13:22:15 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id C934E36C1C2;\n\tMon, 11 Sep 2017 17:22:14 +0000 (UTC)",
            "from red.redhat.com (ovpn-120-44.rdu2.redhat.com [10.10.120.44])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id A2C225D9CA;\n\tMon, 11 Sep 2017 17:22:12 +0000 (UTC)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com C934E36C1C2",
        "From": "Eric Blake <eblake@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Mon, 11 Sep 2017 12:20:20 -0500",
        "Message-Id": "<20170911172022.4738-37-eblake@redhat.com>",
        "In-Reply-To": "<20170911172022.4738-1-eblake@redhat.com>",
        "References": "<20170911172022.4738-1-eblake@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.14",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.29]);\n\tMon, 11 Sep 2017 17:22:14 +0000 (UTC)",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]",
        "X-Received-From": "209.132.183.28",
        "Subject": "[Qemu-devel] [PATCH v7 36/38] libqtest: Merge qtest_memset() with\n\tqmemset()",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<http://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\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Cc": "pbonzini@redhat.com, thuth@redhat.com, John Snow <jsnow@redhat.com>,\n\tarmbru@redhat.com, \"open list:IDE\" <qemu-block@nongnu.org>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"
    },
    "content": "Maintaining two layers of libqtest APIs, one that takes an explicit\nQTestState object, and the other that uses the implicit global_qtest,\nis annoying.  In the interest of getting rid of global implicit\nstate and having less code to maintain, merge:\n qtest_memset()\nwith its short counterpart.  All callers that previously used the\nshort form now make it explicit that they are relying on\nglobal_qtest, and later patches can then clean things up to remove\nthe global variable.\n\nSigned-off-by: Eric Blake <eblake@redhat.com>\n---\n tests/libqtest.h    | 17 ++---------------\n tests/libqtest.c    |  2 +-\n tests/ahci-test.c   |  2 +-\n tests/libqos/ahci.c | 12 ++++++------\n 4 files changed, 10 insertions(+), 23 deletions(-)",
    "diff": "diff --git a/tests/libqtest.h b/tests/libqtest.h\nindex adf04327b7..8f2946ff5e 100644\n--- a/tests/libqtest.h\n+++ b/tests/libqtest.h\n@@ -405,7 +405,7 @@ void memwrite(QTestState *s, uint64_t addr, const void *data, size_t size);\n void bufwrite(QTestState *s, uint64_t addr, const void *data, size_t size);\n\n /**\n- * qtest_memset:\n+ * qmemset:\n  * @s: #QTestState instance to operate on.\n  * @addr: Guest address to write to.\n  * @patt: Byte pattern to fill the guest memory region with.\n@@ -413,7 +413,7 @@ void bufwrite(QTestState *s, uint64_t addr, const void *data, size_t size);\n  *\n  * Write a pattern to guest memory.\n  */\n-void qtest_memset(QTestState *s, uint64_t addr, uint8_t patt, size_t size);\n+void qmemset(QTestState *s, uint64_t addr, uint8_t patt, size_t size);\n\n /**\n  * clock_step_next:\n@@ -592,19 +592,6 @@ static inline QDict *qmp_eventwait_ref(const char *event)\n  */\n char *hmp(const char *fmt, ...) GCC_FMT_ATTR(1, 2);\n\n-/**\n- * qmemset:\n- * @addr: Guest address to write to.\n- * @patt: Byte pattern to fill the guest memory region with.\n- * @size: Number of bytes to write.\n- *\n- * Write a pattern to guest memory.\n- */\n-static inline void qmemset(uint64_t addr, uint8_t patt, size_t size)\n-{\n-    qtest_memset(global_qtest, addr, patt, size);\n-}\n-\n QDict *qmp_fd_receive(int fd);\n void qmp_fd_sendv(int fd, const char *fmt, va_list ap);\n void qmp_fd_send(int fd, const char *fmt, ...);\ndiff --git a/tests/libqtest.c b/tests/libqtest.c\nindex a52dc635f4..ac38f6d4bb 100644\n--- a/tests/libqtest.c\n+++ b/tests/libqtest.c\n@@ -929,7 +929,7 @@ void memwrite(QTestState *s, uint64_t addr, const void *data, size_t size)\n     g_free(enc);\n }\n\n-void qtest_memset(QTestState *s, uint64_t addr, uint8_t pattern, size_t size)\n+void qmemset(QTestState *s, uint64_t addr, uint8_t pattern, size_t size)\n {\n     qtest_sendf(s, \"memset 0x%\" PRIx64 \" 0x%zx 0x%02x\\n\", addr, size, pattern);\n     qtest_rsp(s, 0);\ndiff --git a/tests/ahci-test.c b/tests/ahci-test.c\nindex 4b5f0b23fb..18af01501f 100644\n--- a/tests/ahci-test.c\n+++ b/tests/ahci-test.c\n@@ -873,7 +873,7 @@ static void ahci_test_io_rw_simple(AHCIQState *ahci, unsigned bufsize,\n\n     /* Write this buffer to disk, then read it back to the DMA buffer. */\n     ahci_guest_io(ahci, port, write_cmd, ptr, bufsize, sector);\n-    qtest_memset(ahci->parent->qts, ptr, 0x00, bufsize);\n+    qmemset(ahci->parent->qts, ptr, 0x00, bufsize);\n     ahci_guest_io(ahci, port, read_cmd, ptr, bufsize, sector);\n\n     /*** Read back the Data ***/\ndiff --git a/tests/libqos/ahci.c b/tests/libqos/ahci.c\nindex 433952c11a..f60f60fff5 100644\n--- a/tests/libqos/ahci.c\n+++ b/tests/libqos/ahci.c\n@@ -283,8 +283,8 @@ void ahci_hba_enable(AHCIQState *ahci)\n         /* Allocate Memory for the Command List Buffer & FIS Buffer */\n         /* PxCLB space ... 0x20 per command, as in 4.2.2 p 36 */\n         ahci->port[i].clb = ahci_alloc(ahci, num_cmd_slots * 0x20);\n-        qtest_memset(ahci->parent->qts, ahci->port[i].clb, 0x00,\n-                     num_cmd_slots * 0x20);\n+        qmemset(ahci->parent->qts, ahci->port[i].clb, 0x00,\n+                num_cmd_slots * 0x20);\n         g_test_message(\"CLB: 0x%08\" PRIx64, ahci->port[i].clb);\n         ahci_px_wreg(ahci, i, AHCI_PX_CLB, ahci->port[i].clb);\n         g_assert_cmphex(ahci->port[i].clb, ==,\n@@ -292,7 +292,7 @@ void ahci_hba_enable(AHCIQState *ahci)\n\n         /* PxFB space ... 0x100, as in 4.2.1 p 35 */\n         ahci->port[i].fb = ahci_alloc(ahci, 0x100);\n-        qtest_memset(ahci->parent->qts, ahci->port[i].fb, 0x00, 0x100);\n+        qmemset(ahci->parent->qts, ahci->port[i].fb, 0x00, 0x100);\n         g_test_message(\"FB: 0x%08\" PRIx64, ahci->port[i].fb);\n         ahci_px_wreg(ahci, i, AHCI_PX_FB, ahci->port[i].fb);\n         g_assert_cmphex(ahci->port[i].fb, ==,\n@@ -398,7 +398,7 @@ void ahci_port_clear(AHCIQState *ahci, uint8_t port)\n     g_assert_cmphex(ahci_px_rreg(ahci, port, AHCI_PX_IS), ==, 0);\n\n     /* Wipe the FIS-Receive Buffer */\n-    qtest_memset(ahci->parent->qts, ahci->port[port].fb, 0x00, 0x100);\n+    qmemset(ahci->parent->qts, ahci->port[port].fb, 0x00, 0x100);\n }\n\n /**\n@@ -637,7 +637,7 @@ void ahci_exec(AHCIQState *ahci, uint8_t port,\n     if (opts->size && !opts->buffer) {\n         opts->buffer = ahci_alloc(ahci, opts->size);\n         g_assert(opts->buffer);\n-        qtest_memset(ahci->parent->qts, opts->buffer, 0x00, opts->size);\n+        qmemset(ahci->parent->qts, opts->buffer, 0x00, opts->size);\n     }\n\n     /* Command creation */\n@@ -755,7 +755,7 @@ void ahci_io(AHCIQState *ahci, uint8_t port, uint8_t ide_cmd,\n     g_assert(props);\n     ptr = ahci_alloc(ahci, bufsize);\n     g_assert(!bufsize || ptr);\n-    qtest_memset(ahci->parent->qts, ptr, 0x00, bufsize);\n+    qmemset(ahci->parent->qts, ptr, 0x00, bufsize);\n\n     if (bufsize && props->write) {\n         bufwrite(ahci->parent->qts, ptr, buffer, bufsize);\n",
    "prefixes": [
        "v7",
        "36/38"
    ]
}