get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 810615,
    "url": "http://patchwork.ozlabs.org/api/patches/810615/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/7a2a8a2e-9a3d-7a5b-2ee1-710554d15968@arm.com/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api",
        "name": "GNU Compiler Collection",
        "link_name": "gcc",
        "list_id": "gcc-patches.gcc.gnu.org",
        "list_email": "gcc-patches@gcc.gnu.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<7a2a8a2e-9a3d-7a5b-2ee1-710554d15968@arm.com>",
    "list_archive_url": null,
    "date": "2017-09-06T13:47:32",
    "name": "[2/2,arm] Improve error checking in parsecpu.awk",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "10d1dc3ca0d5d2b2ddebe099366d6bcc828ba68e",
    "submitter": {
        "id": 67887,
        "url": "http://patchwork.ozlabs.org/api/people/67887/?format=api",
        "name": "Richard Earnshaw",
        "email": "Richard.Earnshaw@arm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/7a2a8a2e-9a3d-7a5b-2ee1-710554d15968@arm.com/mbox/",
    "series": [
        {
            "id": 1813,
            "url": "http://patchwork.ozlabs.org/api/series/1813/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=1813",
            "date": "2017-09-06T13:47:32",
            "name": null,
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1813/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/810615/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/810615/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-return-461614-incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "mailing list gcc-patches@gcc.gnu.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461614-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"aZUz3RHE\"; dkim-atps=neutral",
            "sourceware.org; auth=none"
        ],
        "Received": [
            "from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xnPzZ6hgDz9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 23:47:54 +1000 (AEST)",
            "(qmail 57069 invoked by alias); 6 Sep 2017 13:47:42 -0000",
            "(qmail 56362 invoked by uid 89); 6 Sep 2017 13:47:41 -0000",
            "from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com)\n\t(217.140.101.70) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tWed, 06 Sep 2017 13:47:36 +0000",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\tby\n\tusa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id\n\t1BD4515AD\tfor <gcc-patches@gcc.gnu.org>;\n\tWed,  6 Sep 2017 06:47:35 -0700 (PDT)",
            "from [192.168.1.19] (usa-sjc-mx-foss1.foss.arm.com\n\t[217.140.101.70])\tby usa-sjc-imap-foss1.foss.arm.com\n\t(Postfix) with ESMTPSA id 543F63F578;\n\tWed,  6 Sep 2017 06:47:34 -0700 (PDT)"
        ],
        "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:subject:to:message-id:date:mime-version:content-type; q=dns; s=\n\tdefault; b=SCvG6QF92ZGxBxW9iZhinFUc20MzvtGNZbdZ8sQ7shlszsgQfj1pE\n\taec/KDzA3oHSqWIqRwy6lX4jO9WCEfts0FR+Y4Y96MvOv+GxYge01REWwKIltzZt\n\tphg9DmOg1QgpFx4+ougBcVXesfkAAkPdT3Jy7na+SzuD/xsXGav9uA=",
        "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:subject:to:message-id:date:mime-version:content-type; s=\n\tdefault; bh=eddrcR8zU76QavBGznNEz1Drjio=; b=aZUz3RHEu1tp/9kEMOsE\n\tmo0uUyyTbvz1wteftyWog4IO6CxrqIYQ87ANFPkwEgFt/KrSua6AchQ4fvInV5ib\n\tWgunt4tGhIMNzmc/deqXSqexfQRvnFFmSonUKLCS+WGNoLxqKWG6LT5JQxqBl+10\n\t4iNfn2adwgSf4TE9P84gv+c=",
        "Mailing-List": "contact gcc-patches-help@gcc.gnu.org; run by ezmlm",
        "Precedence": "bulk",
        "List-Id": "<gcc-patches.gcc.gnu.org>",
        "List-Unsubscribe": "<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "List-Archive": "<http://gcc.gnu.org/ml/gcc-patches/>",
        "List-Post": "<mailto:gcc-patches@gcc.gnu.org>",
        "List-Help": "<mailto:gcc-patches-help@gcc.gnu.org>",
        "Sender": "gcc-patches-owner@gcc.gnu.org",
        "X-Virus-Found": "No",
        "X-Spam-SWARE-Status": "No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0,\n\tGIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=6246, 6966",
        "X-HELO": "foss.arm.com",
        "From": "\"Richard Earnshaw (lists)\" <Richard.Earnshaw@arm.com>",
        "Subject": "[PATCH 2/2] [arm] Improve error checking in parsecpu.awk",
        "To": "GCC Patches <gcc-patches@gcc.gnu.org>",
        "Message-ID": "<7a2a8a2e-9a3d-7a5b-2ee1-710554d15968@arm.com>",
        "Date": "Wed, 6 Sep 2017 14:47:32 +0100",
        "User-Agent": "Mozilla/5.0 (X11; Linux x86_64;\n\trv:52.0) Gecko/20100101 Thunderbird/52.2.1",
        "MIME-Version": "1.0",
        "Content-Type": "multipart/mixed;\n\tboundary=\"------------46B9915367520505D9ED809F\""
    },
    "content": "This patch adds a bit more error checking to parsecpu.awk to ensure\nthat statements are not missing arguments or have excess arguments\nbeyond those permitted.  It also slightly improves the handling of\nerrors so that we terminate properly if parsing fails and be as\nhelpful as we can while in the parsing phase.\n\n\t* config/arm/parsecpu.awk (fatal): Note that we've encountered an\n\terror.  Only quit immediately if parsing is complete.\n\t(BEGIN): Initialize fatal_err and parse_done.\n\t(begin fpu, end fpu): Check number of arguments.\n\t(begin arch, end arch): Likewise.\n\t(begin cpu, end cpu): Likewise.\n\t(cname, tune for, tune flags, architecture, fpu, option): Likewise.\n\t(optalias): Likewise.\n\ngit-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251800 138bc75d-0d04-0410-961f-82ee72b054a4\n---\n gcc/ChangeLog               | 11 +++++++++++\n gcc/config/arm/parsecpu.awk | 26 +++++++++++++++++++++++++-\n 2 files changed, 36 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/gcc/ChangeLog b/gcc/ChangeLog\nindex cab5166..69713c1 100644\n--- a/gcc/ChangeLog\n+++ b/gcc/ChangeLog\n@@ -1,5 +1,16 @@\n 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>\n \n+\t* config/arm/parsecpu.awk (fatal): Note that we've encountered an\n+\terror.  Only quit immediately if parsing is complete.\n+\t(BEGIN): Initialize fatal_err and parse_done.\n+\t(begin fpu, end fpu): Check number of arguments.\n+\t(begin arch, end arch): Likewise.\n+\t(begin cpu, end cpu): Likewise.\n+\t(cname, tune for, tune flags, architecture, fpu, option): Likewise.\n+\t(optalias): Likewise.\n+\n+2017-09-06  Richard Earnshaw  <rearnsha@arm.com>\n+\n \t* config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.\n \t* config/arm/arm-isa.h: Delete.  Move definitions to ...\n \t* arm-cpus.in: ... here.  Use new feature and fgroup values.\ndiff --git a/gcc/config/arm/parsecpu.awk b/gcc/config/arm/parsecpu.awk\nindex d07d3fc..0b4fc68 100644\n--- a/gcc/config/arm/parsecpu.awk\n+++ b/gcc/config/arm/parsecpu.awk\n@@ -32,7 +32,8 @@\n \n function fatal (m) {\n     print \"error (\"lineno\"): \" m > \"/dev/stderr\"\n-    exit 1\n+    fatal_err = 1\n+    if (parse_done) exit 1\n }\n \n function toplevel () {\n@@ -502,14 +503,18 @@ BEGIN {\n     arch_name = \"\"\n     fpu_name = \"\"\n     lineno = 0\n+    fatal_err = 0\n+    parse_done = 0\n     if (cmd == \"\") fatal(\"Usage parsecpu.awk -v cmd=<xyz>\")\n }\n \n+# New line.  Reset parse status and increment line count for error messages\n // {\n     lineno++\n     parse_ok = 0\n }\n \n+# Comments must be on a line on their own.\n /^#/ {\n     parse_ok = 1\n }\n@@ -552,12 +557,14 @@ BEGIN {\n }\n \n /^begin fpu / {\n+    if (NF != 3) fatal(\"syntax: begin fpu <name>\")\n     toplevel()\n     fpu_name = $3\n     parse_ok = 1\n }\n \n /^end fpu / {\n+    if (NF != 3) fatal(\"syntax: end fpu <name>\")\n     if (fpu_name != $3) fatal(\"mimatched end fpu\")\n     if (! (fpu_name in fpu_isa)) {\n \tfatal(\"fpu definition \\\"\" fpu_name \"\\\" lacks an \\\"isa\\\" statement\")\n@@ -570,24 +577,28 @@ BEGIN {\n }\n \n /^begin arch / {\n+    if (NF != 3) fatal(\"syntax: begin arch <name>\")\n     toplevel()\n     arch_name = $3\n     parse_ok = 1\n }\n \n /^[ \t]*base / {\n+    if (NF != 2) fatal(\"syntax: base <architecture-base-name>\")\n     if (arch_name == \"\") fatal(\"\\\"base\\\" statement outside of arch block\")\n     arch_base[arch_name] = $2\n     parse_ok = 1\n }\n \n /^[ \t]*profile / {\n+    if (NF != 2) fatal(\"syntax: profile <profile-name>\")\n     if (arch_name == \"\") fatal(\"\\\"profile\\\" statement outside of arch block\")\n     arch_prof[arch_name] = $2\n     parse_ok = 1\n }\n \n /^end arch / {\n+    if (NF != 3) fatal(\"syntax: end arch <name>\")\n     if (arch_name != $3) fatal(\"mimatched end arch\")\n     if (! arch_name in arch_tune_for) {\n \tfatal(\"arch definition lacks a \\\"tune for\\\" statement\")\n@@ -603,18 +614,21 @@ BEGIN {\n }\n \n /^begin cpu / {\n+    if (NF != 3) fatal(\"syntax: begin cpu <name>\")\n     toplevel()\n     cpu_name = $3\n     parse_ok = 1\n }\n \n /^[ \t]*cname / {\n+    if (NF != 2) fatal(\"syntax: cname <identifier>\")\n     if (cpu_name == \"\") fatal(\"\\\"cname\\\" outside of cpu block\")\n     cpu_cnames[cpu_name] = $2\n     parse_ok = 1\n }\n \n /^[ \t]*tune for / {\n+    if (NF != 3) fatal(\"syntax: tune for <cpu-name>\")\n     if (cpu_name != \"\") {\n \tcpu_tune_for[cpu_name] = $3\n     } else if (arch_name != \"\") {\n@@ -624,6 +638,7 @@ BEGIN {\n }\n \n /^[ \t]*tune flags / {\n+    if (NF < 3) fatal(\"syntax: tune flags <flag> [<flag>]*\")\n     flags=\"\"\n     flag_count = NF\n     for (n = 3; n <= flag_count; n++) {\n@@ -640,18 +655,21 @@ BEGIN {\n }\n \n /^[ \t]*architecture / {\n+    if (NF != 2) fatal(\"syntax: architecture <arch-name>\")\n     if (cpu_name == \"\") fatal(\"\\\"architecture\\\" outside of cpu block\")\n     cpu_arch[cpu_name] = $2\n     parse_ok = 1\n }\n \n /^[ \t]*fpu / {\n+    if (NF != 2) fatal(\"syntax: fpu <fpu-name>\")\n     if (cpu_name == \"\") fatal(\"\\\"fpu\\\" outside of cpu block\")\n     cpu_fpu[cpu_name] = $2\n     parse_ok = 1\n }\n \n /^[ \t]*isa / {\n+    if (NF < 2) fatal(\"syntax: isa <feature-or-fgroup> [<feature-or-fgroup>]*\")\n     flags=\"\"\n     flag_count = NF\n     for (n = 2; n <= flag_count; n++) {\n@@ -670,6 +688,7 @@ BEGIN {\n }\n \n /^[ \t]*option / {\n+    if (NF < 4) fatal(\"syntax: option <name> add|remove <feature-or-fgroup>+\")\n     name=$2\n     if ($3 == \"add\") {\n \tremove = \"false\"\n@@ -696,6 +715,7 @@ BEGIN {\n }\n \n /^[ \t]*optalias / {\n+    if (NF != 3) fatal(\"syntax: optalias <name> <option-name>\")\n     name=$2\n     alias=$3\n     if (cpu_name != \"\") {\n@@ -709,12 +729,14 @@ BEGIN {\n }\n \n /^[ \t]*costs / {\n+    if (NF != 2) fatal(\"syntax: costs <identifier>\")\n     if (cpu_name == \"\") fatal(\"\\\"costs\\\" outside of cpu block\")\n     cpu_cost[cpu_name] = $2\n     parse_ok = 1\n }\n \n /^end cpu / {\n+    if (NF != 3) fatal(\"syntax: end cpu <name>\")\n     if (cpu_name != $3) fatal(\"mimatched end cpu\")\n     if (! (cpu_name in cpu_cnames)) {\n \tcpu_cnames[cpu_name] = cpu_name\n@@ -731,6 +753,8 @@ BEGIN {\n }\n \n END {\n+    parse_done = 1\n+    if (fatal_err) exit 1\n     toplevel()\n     if (cmd == \"data\") {\n \tgen_data()\n\n",
    "prefixes": [
        "2/2",
        "arm"
    ]
}