get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 556241,
    "url": "http://patchwork.ozlabs.org/api/patches/556241/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/566DF537.4080602@simon.arlott.org.uk/",
    "project": {
        "id": 3,
        "url": "http://patchwork.ozlabs.org/api/projects/3/?format=api",
        "name": "Linux MTD development",
        "link_name": "linux-mtd",
        "list_id": "linux-mtd.lists.infradead.org",
        "list_email": "linux-mtd@lists.infradead.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<566DF537.4080602@simon.arlott.org.uk>",
    "list_archive_url": null,
    "date": "2015-12-13T22:46:15",
    "name": "[linux-next,v4,02/11] MIPS: bcm63xx: nvram: Use nvram structure definition from header file",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "140f03ba6bbf2bdf59330685a56251be24d9cb74",
    "submitter": {
        "id": 1123,
        "url": "http://patchwork.ozlabs.org/api/people/1123/?format=api",
        "name": "Simon Arlott",
        "email": "simon@fire.lp0.eu"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/566DF537.4080602@simon.arlott.org.uk/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/556241/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/556241/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n\t[IPv6:2001:1868:205::9])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 2FE501401DA\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 14 Dec 2015 09:47:56 +1100 (AEDT)",
            "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux))\n\tid 1a8FPe-0005hc-LC; Sun, 13 Dec 2015 22:46:42 +0000",
            "from proxima.lp0.eu ([2001:8b0:ffea:0:205:b4ff:fe12:530])\n\tby bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux))\n\tid 1a8FPb-0005cs-KQ\n\tfor linux-mtd@lists.infradead.org; Sun, 13 Dec 2015 22:46:40 +0000",
            "from redrum.lp0.eu ([2001:8b0:ffea:0:2e0:81ff:fe4d:2bec]:44494\n\tident=simon)\n\tby proxima.lp0.eu ([2001:8b0:ffea:0:205:b4ff:fe12:530]:465)\n\twith esmtpsav (UNKNOWN:DHE-RSA-AES256-SHA:256/CN=Simon Arlott)\n\tid 1a8FPF-0003qA-3C (Exim); Sun, 13 Dec 2015 22:46:18 +0000"
        ],
        "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tsecure) header.d=fire.lp0.eu header.i=@fire.lp0.eu header.b=YMVT4hOF;\n\tdkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=fire.lp0.eu; s=exim; \n\th=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject;\n\tbh=yaXBPGz02rz+lnhjt/Q6LDJwDOAVoYK9eql58J/hJj8=; \n\tb=YMVT4hOF19WCPRe9bixihJjIoj9fIWyCQj1+Ip6Nh80OdsVRQV1O7/3I3qgB7dhoCLag7ad6oN18rpswzN8cSG9IbynJf2p8xeu8HmnVqsd/q73KwBGNZLGrrst+tzNDk2A5HpAKjjApRx8tbNP72qhqV0Eq/EEfcfvnhrRspjpED2i0WJ2kfP/aB0BpRXSnGnq2/bKAgX+xUI+d8iTfraoXAVj2chq7iyGCiIsmWKpd5L2VIv22A2439XJZCd6AFitR1pH1UEGVBOixP+O7VZINXpZPq9bibDf30huBXrxXPYOHM2v3or7Y7EGYQ+WdcBzPAWiR0ROSgUPFH/J5nA==;",
        "Subject": "[PATCH linux-next v4 02/11] MIPS: bcm63xx: nvram: Use nvram\n\tstructure definition from header file",
        "To": "Ralf Baechle <ralf@linux-mips.org>, David Woodhouse\n\t<dwmw2@infradead.org>, Brian Norris <computersforpeace@gmail.com>,\n\tKevin Cernekee <cernekee@gmail.com>, Florian Fainelli\n\t<f.fainelli@gmail.com>, Jonas Gorski <jogo@openwrt.org>",
        "References": "<566DF43B.5010400@simon.arlott.org.uk>",
        "From": "Simon Arlott <simon@fire.lp0.eu>",
        "Message-ID": "<566DF537.4080602@simon.arlott.org.uk>",
        "Date": "Sun, 13 Dec 2015 22:46:15 +0000",
        "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101\n\tThunderbird/38.4.0",
        "MIME-Version": "1.0",
        "In-Reply-To": "<566DF43B.5010400@simon.arlott.org.uk>",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20151213_144639_931451_78CAF95A ",
        "X-CRM114-Status": "GOOD (  11.39  )",
        "X-Spam-Score": "-4.3 (----)",
        "X-Spam-Report": "SpamAssassin version 3.4.0 on bombadil.infradead.org summary:\n\tContent analysis details:   (-4.3 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\n\tmedium trust [2001:8b0:ffea:0:205:b4ff:fe12:530 listed in]\n\t[list.dnswl.org]\n\t-0.0 SPF_HELO_PASS          SPF: HELO matches SPF record\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature",
        "X-BeenThere": "linux-mtd@lists.infradead.org",
        "X-Mailman-Version": "2.1.20",
        "Precedence": "list",
        "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd/>",
        "List-Post": "<mailto:linux-mtd@lists.infradead.org>",
        "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>",
        "Cc": "MIPS Mailing List <linux-mips@linux-mips.org>,\n\tMTD Maling List <linux-mtd@lists.infradead.org>,\n\tLinux Kernel Mailing List <linux-kernel@vger.kernel.org>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>",
        "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "Use the common definition of the nvram structure from the header file\ninclude/linux/bcm963xx_nvram.h instead of maintaining a separate copy.\n\nRead the version 5 size of nvram data from memory and then call the\nnew checksum verification function from the header file.\n\nSigned-off-by: Simon Arlott <simon@fire.lp0.eu>\n---\nv4: Use checksum verification function from header file.\n\nv3: No changes (reworded commit message).\n\nv2: Use external struct bcm963xx_nvram definition for bcm963268part.\n\n arch/mips/bcm63xx/nvram.c | 35 +++--------------------------------\n 1 file changed, 3 insertions(+), 32 deletions(-)",
    "diff": "diff --git a/arch/mips/bcm63xx/nvram.c b/arch/mips/bcm63xx/nvram.c\nindex 4b50d40..05757ae 100644\n--- a/arch/mips/bcm63xx/nvram.c\n+++ b/arch/mips/bcm63xx/nvram.c\n@@ -10,6 +10,7 @@\n \n #define pr_fmt(fmt) \"bcm63xx_nvram: \" fmt\n \n+#include <linux/bcm963xx_nvram.h>\n #include <linux/init.h>\n #include <linux/crc32.h>\n #include <linux/export.h>\n@@ -18,23 +19,6 @@\n \n #include <bcm63xx_nvram.h>\n \n-/*\n- * nvram structure\n- */\n-struct bcm963xx_nvram {\n-\tu32\tversion;\n-\tu8\treserved1[256];\n-\tu8\tname[16];\n-\tu32\tmain_tp_number;\n-\tu32\tpsi_size;\n-\tu32\tmac_addr_count;\n-\tu8\tmac_addr_base[ETH_ALEN];\n-\tu8\treserved2[2];\n-\tu32\tchecksum_old;\n-\tu8\treserved3[720];\n-\tu32\tchecksum_high;\n-};\n-\n #define BCM63XX_DEFAULT_PSI_SIZE\t64\n \n static struct bcm963xx_nvram nvram;\n@@ -42,27 +26,14 @@ static int mac_addr_used;\n \n void __init bcm63xx_nvram_init(void *addr)\n {\n-\tunsigned int check_len;\n \tu32 crc, expected_crc;\n \tu8 hcs_mac_addr[ETH_ALEN] = { 0x00, 0x10, 0x18, 0xff, 0xff, 0xff };\n \n \t/* extract nvram data */\n-\tmemcpy(&nvram, addr, sizeof(nvram));\n+\tmemcpy(&nvram, addr, BCM963XX_NVRAM_V5_SIZE);\n \n \t/* check checksum before using data */\n-\tif (nvram.version <= 4) {\n-\t\tcheck_len = offsetof(struct bcm963xx_nvram, reserved3);\n-\t\texpected_crc = nvram.checksum_old;\n-\t\tnvram.checksum_old = 0;\n-\t} else {\n-\t\tcheck_len = sizeof(nvram);\n-\t\texpected_crc = nvram.checksum_high;\n-\t\tnvram.checksum_high = 0;\n-\t}\n-\n-\tcrc = crc32_le(~0, (u8 *)&nvram, check_len);\n-\n-\tif (crc != expected_crc)\n+\tif (bcm963xx_nvram_checksum(&nvram, &expected_crc, &crc))\n \t\tpr_warn(\"nvram checksum failed, contents may be invalid (expected %08x, got %08x)\\n\",\n \t\t\texpected_crc, crc);\n \n",
    "prefixes": [
        "linux-next",
        "v4",
        "02/11"
    ]
}