get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 811247,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/811247/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170907224051.21518-7-richard.henderson@linaro.org/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20170907224051.21518-7-richard.henderson@linaro.org>",
    "list_archive_url": null,
    "date": "2017-09-07T22:40:34",
    "name": "[PULL,06/23] tcg/s390: Fix sign of patch_reloc addend",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "04d29c65028c2ac6736b1c38160226c5599800a1",
    "submitter": {
        "id": 72104,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/72104/?format=api",
        "name": "Richard Henderson",
        "email": "richard.henderson@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170907224051.21518-7-richard.henderson@linaro.org/mbox/",
    "series": [
        {
            "id": 2073,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/2073/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2073",
            "date": "2017-09-07T22:40:28",
            "name": "[PULL,01/23] tcg: Move USE_DIRECT_JUMP discriminator to tcg/cpu/tcg-target.h",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/2073/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/811247/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/811247/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>)",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"CIZg1MuI\"; dkim-atps=neutral"
        ],
        "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 3xpFzX46x7z9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 08:50:48 +1000 (AEST)",
            "from localhost ([::1]:42551 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 1dq5dG-0002Pd-9N\n\tfor incoming@patchwork.ozlabs.org; Thu, 07 Sep 2017 18:50:46 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:52026)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <richard.henderson@linaro.org>) id 1dq5Tw-0002yt-PB\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:14 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <richard.henderson@linaro.org>) id 1dq5Tr-00086H-VS\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:08 -0400",
            "from mail-pg0-x232.google.com ([2607:f8b0:400e:c05::232]:37894)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <richard.henderson@linaro.org>)\n\tid 1dq5Tr-00085b-PI\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:03 -0400",
            "by mail-pg0-x232.google.com with SMTP id v66so1788082pgb.5\n\tfor <qemu-devel@nongnu.org>; Thu, 07 Sep 2017 15:41:03 -0700 (PDT)",
            "from bigtime.twiddle.net (97-126-108-236.tukw.qwest.net.\n\t[97.126.108.236]) by smtp.gmail.com with ESMTPSA id\n\th19sm770678pfh.142.2017.09.07.15.41.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 07 Sep 2017 15:41:01 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=D31O/54Mb9A2MohOqll5CAXSVcOTWb7bn2dqdUgudLw=;\n\tb=CIZg1MuIwqRCwe5o5unI5m6eLfXNnEW6lU8TAoV7i4ufkt201S/eOmhF4SOHCfxUUB\n\tjt22TC3bDCbCnPJ708C7EJAXv82U0iMlIIBPvfoCUEFbyrsKzO2r4QNc0K9WubCw8db9\n\tFoL0HVSq5sr8gVo5rdHSL7F0/gPYWqTDblQRU=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=D31O/54Mb9A2MohOqll5CAXSVcOTWb7bn2dqdUgudLw=;\n\tb=N3TUnBp+AttLuftr8Gl8UzAutUbkFpbXb1mr9g6/f+3vw0KRpXmdxF3tBUxymf828T\n\tBGOvB0yNYOfJj6Q6o68D2gVIflbq4rXIyuXay5olGWYOkctnTs6bsHZ96UHlV4KQ+v9K\n\tbmi4Q9uNqENDZb0dXydSyExF8nYMbrZaF+VCUxXAN3vb4pWmsLpKoh8YS4ZXH0FcFiag\n\tF7DYayoq1HXh8aJsUGegsNorfOzZSlgqQCKOXf9fb9d83R57JAiXwzEsgSsm0dpNuiST\n\to/XcyfNPLyPgGkKemDfqUhkmhhfavZWG9L1eQGwLPluFgMAKAfrciEiHUj8MQ8Xe3Jwe\n\tbtvw==",
        "X-Gm-Message-State": "AHPjjUjQbS2JXdPcEL2btDcGXxyodyPCtk5gOElcvkzXXN1ZMU0SAoc6\n\t2p64DO8c0BJ8lyUgiWkFtg==",
        "X-Google-Smtp-Source": "ADKCNb5OuI8i2lHiSBe/jOKOB+up0EoPJ9TX7ivy/kY3xp8nW6SWlBl7g2BQilWJ2cjnv6G/F9hMNg==",
        "X-Received": "by 10.99.106.69 with SMTP id f66mr936143pgc.425.1504824062498;\n\tThu, 07 Sep 2017 15:41:02 -0700 (PDT)",
        "From": "Richard Henderson <richard.henderson@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Thu,  7 Sep 2017 15:40:34 -0700",
        "Message-Id": "<20170907224051.21518-7-richard.henderson@linaro.org>",
        "X-Mailer": "git-send-email 2.13.5",
        "In-Reply-To": "<20170907224051.21518-1-richard.henderson@linaro.org>",
        "References": "<20170907224051.21518-1-richard.henderson@linaro.org>",
        "X-detected-operating-system": "by eggs.gnu.org: Genre and OS details not\n\trecognized.",
        "X-Received-From": "2607:f8b0:400e:c05::232",
        "Subject": "[Qemu-devel] [PULL 06/23] tcg/s390: Fix sign of patch_reloc addend",
        "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": "peter.maydell@linaro.org, Richard Henderson <rth@twiddle.net>",
        "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": "From: Richard Henderson <rth@twiddle.net>\n\nWe were passing in -2 instead of +2, but then ignoring\nthe actual contents of addend in the calculation.\n\nSigned-off-by: Richard Henderson <rth@twiddle.net>\n---\n tcg/s390/tcg-target.inc.c | 25 +++++++++++++------------\n 1 file changed, 13 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c\nindex e007586315..59c0da0922 100644\n--- a/tcg/s390/tcg-target.inc.c\n+++ b/tcg/s390/tcg-target.inc.c\n@@ -360,21 +360,22 @@ uint64_t s390_facilities;\n static void patch_reloc(tcg_insn_unit *code_ptr, int type,\n                         intptr_t value, intptr_t addend)\n {\n-    intptr_t pcrel2 = (tcg_insn_unit *)value - (code_ptr - 1);\n-    tcg_debug_assert(addend == -2);\n+    intptr_t pcrel2;\n+\n+    value += addend;\n+    pcrel2 = (tcg_insn_unit *)value - code_ptr;\n \n     switch (type) {\n     case R_390_PC16DBL:\n-        tcg_debug_assert(pcrel2 == (int16_t)pcrel2);\n+        assert(pcrel2 == (int16_t)pcrel2);\n         tcg_patch16(code_ptr, pcrel2);\n         break;\n     case R_390_PC32DBL:\n-        tcg_debug_assert(pcrel2 == (int32_t)pcrel2);\n+        assert(pcrel2 == (int32_t)pcrel2);\n         tcg_patch32(code_ptr, pcrel2);\n         break;\n     default:\n-        tcg_abort();\n-        break;\n+        g_assert_not_reached();\n     }\n }\n \n@@ -1270,11 +1271,11 @@ static void tgen_branch(TCGContext *s, int cc, TCGLabel *l)\n         tgen_gotoi(s, cc, l->u.value_ptr);\n     } else if (USE_LONG_BRANCHES) {\n         tcg_out16(s, RIL_BRCL | (cc << 4));\n-        tcg_out_reloc(s, s->code_ptr, R_390_PC32DBL, l, -2);\n+        tcg_out_reloc(s, s->code_ptr, R_390_PC32DBL, l, 2);\n         s->code_ptr += 2;\n     } else {\n         tcg_out16(s, RI_BRC | (cc << 4));\n-        tcg_out_reloc(s, s->code_ptr, R_390_PC16DBL, l, -2);\n+        tcg_out_reloc(s, s->code_ptr, R_390_PC16DBL, l, 2);\n         s->code_ptr += 1;\n     }\n }\n@@ -1289,7 +1290,7 @@ static void tgen_compare_branch(TCGContext *s, S390Opcode opc, int cc,\n     } else {\n         /* We need to keep the offset unchanged for retranslation.  */\n         off = s->code_ptr[1];\n-        tcg_out_reloc(s, s->code_ptr + 1, R_390_PC16DBL, l, -2);\n+        tcg_out_reloc(s, s->code_ptr + 1, R_390_PC16DBL, l, 2);\n     }\n \n     tcg_out16(s, (opc & 0xff00) | (r1 << 4) | r2);\n@@ -1307,7 +1308,7 @@ static void tgen_compare_imm_branch(TCGContext *s, S390Opcode opc, int cc,\n     } else {\n         /* We need to keep the offset unchanged for retranslation.  */\n         off = s->code_ptr[1];\n-        tcg_out_reloc(s, s->code_ptr + 1, R_390_PC16DBL, l, -2);\n+        tcg_out_reloc(s, s->code_ptr + 1, R_390_PC16DBL, l, 2);\n     }\n \n     tcg_out16(s, (opc & 0xff00) | (r1 << 4) | cc);\n@@ -1571,7 +1572,7 @@ static void tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)\n     TCGMemOpIdx oi = lb->oi;\n     TCGMemOp opc = get_memop(oi);\n \n-    patch_reloc(lb->label_ptr[0], R_390_PC16DBL, (intptr_t)s->code_ptr, -2);\n+    patch_reloc(lb->label_ptr[0], R_390_PC16DBL, (intptr_t)s->code_ptr, 2);\n \n     tcg_out_mov(s, TCG_TYPE_PTR, TCG_REG_R2, TCG_AREG0);\n     if (TARGET_LONG_BITS == 64) {\n@@ -1592,7 +1593,7 @@ static void tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)\n     TCGMemOpIdx oi = lb->oi;\n     TCGMemOp opc = get_memop(oi);\n \n-    patch_reloc(lb->label_ptr[0], R_390_PC16DBL, (intptr_t)s->code_ptr, -2);\n+    patch_reloc(lb->label_ptr[0], R_390_PC16DBL, (intptr_t)s->code_ptr, 2);\n \n     tcg_out_mov(s, TCG_TYPE_PTR, TCG_REG_R2, TCG_AREG0);\n     if (TARGET_LONG_BITS == 64) {\n",
    "prefixes": [
        "PULL",
        "06/23"
    ]
}