get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 811964,
    "url": "http://patchwork.ozlabs.org/api/patches/811964/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/150496956243.9654.5568893219758334324.stgit@bahia/",
    "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": "<150496956243.9654.5568893219758334324.stgit@bahia>",
    "list_archive_url": null,
    "date": "2017-09-09T15:06:02",
    "name": "[1/5] spapr_pci: drop useless check in spapr_phb_vfio_get_loc_code()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "04a8fd499950a3614c6047d0c733246752994b61",
    "submitter": {
        "id": 69178,
        "url": "http://patchwork.ozlabs.org/api/people/69178/?format=api",
        "name": "Greg Kurz",
        "email": "groug@kaod.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/150496956243.9654.5568893219758334324.stgit@bahia/mbox/",
    "series": [
        {
            "id": 2354,
            "url": "http://patchwork.ozlabs.org/api/series/2354/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2354",
            "date": "2017-09-09T15:05:46",
            "name": "spapr_pci: various cleanups and improvements",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/2354/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/811964/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/811964/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>)",
        "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 3xqHdv0Vftz9s7F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 10 Sep 2017 01:09:07 +1000 (AEST)",
            "from localhost ([::1]:49883 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 1dqhNZ-00011n-3m\n\tfor incoming@patchwork.ozlabs.org; Sat, 09 Sep 2017 11:09:05 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:50547)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <groug@kaod.org>) id 1dqhKh-0007cy-5q\n\tfor qemu-devel@nongnu.org; Sat, 09 Sep 2017 11:06:09 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <groug@kaod.org>) id 1dqhKg-0005ut-Ce\n\tfor qemu-devel@nongnu.org; Sat, 09 Sep 2017 11:06:07 -0400",
            "from 6.mo177.mail-out.ovh.net ([46.105.51.249]:49645)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <groug@kaod.org>) id 1dqhKg-0005td-5v\n\tfor qemu-devel@nongnu.org; Sat, 09 Sep 2017 11:06:06 -0400",
            "from player714.ha.ovh.net (b6.ovh.net [213.186.33.56])\n\tby mo177.mail-out.ovh.net (Postfix) with ESMTP id 3297274BCE\n\tfor <qemu-devel@nongnu.org>; Sat,  9 Sep 2017 17:06:05 +0200 (CEST)",
            "from [192.168.0.243] (gar31-1-82-66-74-139.fbx.proxad.net\n\t[82.66.74.139]) (Authenticated sender: groug@kaod.org)\n\tby player714.ha.ovh.net (Postfix) with ESMTPA id F13E23C0073;\n\tSat,  9 Sep 2017 17:06:02 +0200 (CEST)"
        ],
        "From": "Greg Kurz <groug@kaod.org>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Sat, 09 Sep 2017 17:06:02 +0200",
        "Message-ID": "<150496956243.9654.5568893219758334324.stgit@bahia>",
        "In-Reply-To": "<150496954641.9654.1998704077006846521.stgit@bahia>",
        "References": "<150496954641.9654.1998704077006846521.stgit@bahia>",
        "User-Agent": "StGit/0.17.1-46-g6855-dirty",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "X-Ovh-Tracer-Id": "242349956608137555",
        "X-VR-SPAMSTATE": "OK",
        "X-VR-SPAMSCORE": "-100",
        "X-VR-SPAMCAUSE": "gggruggvucftvghtrhhoucdtuddrfeelledrfeeigdekjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]",
        "X-Received-From": "46.105.51.249",
        "Subject": "[Qemu-devel] [PATCH 1/5] spapr_pci: drop useless check in\n\tspapr_phb_vfio_get_loc_code()",
        "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": "qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au>",
        "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": "g_strdup_printf() either returns a non-null pointer, either aborts\nif it failed to allocate memory.\n\nSigned-off-by: Greg Kurz <groug@kaod.org>\n---\n hw/ppc/spapr_pci.c |    4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c\nindex d7880f257aa1..ef982f2ef370 100644\n--- a/hw/ppc/spapr_pci.c\n+++ b/hw/ppc/spapr_pci.c\n@@ -766,7 +766,7 @@ static char *spapr_phb_vfio_get_loc_code(sPAPRPHBState *sphb,  PCIDevice *pdev)\n     /* Construct the path of the file that will give us the DT location */\n     path = g_strdup_printf(\"/sys/bus/pci/devices/%s/devspec\", host);\n     g_free(host);\n-    if (!path || !g_file_get_contents(path, &buf, NULL, NULL)) {\n+    if (!g_file_get_contents(path, &buf, NULL, NULL)) {\n         goto err_out;\n     }\n     g_free(path);\n@@ -774,7 +774,7 @@ static char *spapr_phb_vfio_get_loc_code(sPAPRPHBState *sphb,  PCIDevice *pdev)\n     /* Construct and read from host device tree the loc-code */\n     path = g_strdup_printf(\"/proc/device-tree%s/ibm,loc-code\", buf);\n     g_free(buf);\n-    if (!path || !g_file_get_contents(path, &buf, NULL, NULL)) {\n+    if (!g_file_get_contents(path, &buf, NULL, NULL)) {\n         goto err_out;\n     }\n     return buf;\n",
    "prefixes": [
        "1/5"
    ]
}