get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 812282,
    "url": "http://patchwork.ozlabs.org/api/patches/812282/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/1505122921-5534-2-git-send-email-bmeng.cn@gmail.com/",
    "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": "<1505122921-5534-2-git-send-email-bmeng.cn@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-11T09:41:51",
    "name": "[v2,01/10] spi-nor: intel-spi: Fix number of protected range registers for BYT/LPT",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "455984302a25329ed24dbad91fdbe330d932c530",
    "submitter": {
        "id": 64981,
        "url": "http://patchwork.ozlabs.org/api/people/64981/?format=api",
        "name": "Bin Meng",
        "email": "bmeng.cn@gmail.com"
    },
    "delegate": {
        "id": 63396,
        "url": "http://patchwork.ozlabs.org/api/users/63396/?format=api",
        "username": "cpitchen",
        "first_name": "Cyrille",
        "last_name": "Pitchen",
        "email": "cyrille.pitchen@atmel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/1505122921-5534-2-git-send-email-bmeng.cn@gmail.com/mbox/",
    "series": [
        {
            "id": 2464,
            "url": "http://patchwork.ozlabs.org/api/series/2464/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=2464",
            "date": "2017-09-11T09:41:50",
            "name": "spi-nor: intel-spi: Various fixes and enhancements",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/2464/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/812282/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/812282/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",
        "Authentication-Results": [
            "ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"EtEcCTah\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"MKDW3nbg\"; dkim-atps=neutral"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\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 3xrNDC42G2z9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 19:39:07 +1000 (AEST)",
            "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1drLBF-0006af-Uo; Mon, 11 Sep 2017 09:39:02 +0000",
            "from mail-it0-x241.google.com ([2607:f8b0:4001:c0b::241])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1drLAH-00068R-M2\n\tfor linux-mtd@lists.infradead.org; Mon, 11 Sep 2017 09:38:04 +0000",
            "by mail-it0-x241.google.com with SMTP id d6so3842516itc.4\n\tfor <linux-mtd@lists.infradead.org>;\n\tMon, 11 Sep 2017 02:37:41 -0700 (PDT)",
            "from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com.\n\t[147.11.156.139]) by smtp.gmail.com with ESMTPSA id\n\ts2sm4121069ioa.2.2017.09.11.02.37.38\n\t(version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 11 Sep 2017 02:37:39 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:\n\tIn-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Owner;\n\tbh=9n68d5EGeYYyhQ+gO/RpscGzjXwgk0mdvxpJW2w+zF8=;\n\tb=EtEcCTahYIbkKdxj6f03TblgnR\n\tc4N/b+svEPvCALsijYlIhouQ+KEN5DKqqjFlCZN+5n4DvyZ2OQsKBVr8tMAWyGIK0ZGDG12KzcIpL\n\tIDq5BTMBB50hFsCKAOMrxvK1NzCi0uwfVZhiv3oqQUqxRx4Zze7qjS1b9un25m1H85cDVqJtexLBu\n\tdpIF6CaYktSm0T9oHDhHZveCuu81YY2zMn82kCJ2k3IhsGz0UeeyiNzaenYe02kCI3JFVwngY/hcI\n\tk6TjM/LAdalWmYQ3iZK1c4xg0BrdpdtSGaYpmibcllQLhottlN+YB9Ry/mlSERITJVxsNQ4WNm3LI\n\tQ1FjiOwA==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=CuPjCifY1oOEOSDDLZvuGzbj2ZUNxXhHYuuGD1Vxqmo=;\n\tb=MKDW3nbgt0fsrtIiALL/xhwtVMbV33TGdPXTc2EuCxw3t47IE6It4zoHVXmJtF2GnQ\n\t9ifKLjbztKkMQHVwR08OTK78kH0GQPsy3XZ3NaXrlXUFM+XH8BN9w/f0f1z6mBA1Igb9\n\tCYyOn4ud/Sd4raUlgWKV3MnJyHxK86QJD4CJpPDp4lfOw1N8va/mQTP1/Hl2vBI6KxMu\n\ts9/BCfQi1WrXaxjp18fgCB+dVIwkzzT5aeXkt5En1cOu2oRpCtcwx96GtIgNwqHrBl6R\n\tI1bvQsNtUYgb6UCU9sBv3HriH5VokQ8KAIbrV2BBeGLzIzxKO+aWs6EENPNzPyEpOrnK\n\t3xIw=="
        ],
        "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=CuPjCifY1oOEOSDDLZvuGzbj2ZUNxXhHYuuGD1Vxqmo=;\n\tb=qenDDUw5yUPJKAYRmmjOgn+6/nNsPHZQBrxBxrz4Uq+Ns8JWqA1nSff5na7APKwysi\n\trm8SgC5eOToBPWO6afcvTU3rgub6EAnXa79PCnmkPLo0HkBlt3vwbosQgPJcgmJTgBTR\n\tu52t80IjzD+IJasK7vferPzBVaVQEkBEwkc/QvbpXL3nfiabnVSgGwaAucIj28kbgFWe\n\tkRCr+6/eJb3Dzvc+56N5bma8caII4OsLlKYq0CtmRmXuVkep1odK3Hnq1PXhZ4Uv7Nb/\n\t6rmKJwxqlYrccSnpsb9cn7mOAO1TGlB/vdMDPqLrB5rv6GuEiTz+c1byXk6mOkVoWELy\n\tc0hA==",
        "X-Gm-Message-State": "AHPjjUjPOaCwFL1vPs4/KkUKoZ79LR0BuVMKilJgb9vDd5CYuRZvmw5L\n\tboodVV7NOywf1uan",
        "X-Google-Smtp-Source": "AOwi7QB4r/i3X+NZpmNjP9H7eFTeP3fKxD+D6JvaqhjFBXWAWHhbl4WTfUNPjk/Bi1M5t0KLmYw16Q==",
        "X-Received": "by 10.36.218.194 with SMTP id z185mr13234088itg.60.1505122660732;\n\tMon, 11 Sep 2017 02:37:40 -0700 (PDT)",
        "From": "Bin Meng <bmeng.cn@gmail.com>",
        "To": "Mika Westerberg <mika.westerberg@linux.intel.com>,\n\tCyrille Pitchen <cyrille.pitchen@wedev4u.fr>,\n\tMarek Vasut <marek.vasut@gmail.com>,\n\tBoris Brezillon <boris.brezillon@free-electrons.com>,\n\tBrian Norris <computersforpeace@gmail.com>,\n\tRichard Weinberger <richard@nod.at>,\n\tDavid Woodhouse <dwmw2@infradead.org>, \n\tlinux-mtd <linux-mtd@lists.infradead.org>,\n\tlinux-kernel <linux-kernel@vger.kernel.org>",
        "Subject": "[PATCH v2 01/10] spi-nor: intel-spi: Fix number of protected range\n\tregisters for BYT/LPT",
        "Date": "Mon, 11 Sep 2017 02:41:51 -0700",
        "Message-Id": "<1505122921-5534-2-git-send-email-bmeng.cn@gmail.com>",
        "X-Mailer": "git-send-email 1.7.9.5",
        "In-Reply-To": "<1505122921-5534-1-git-send-email-bmeng.cn@gmail.com>",
        "References": "<1505122921-5534-1-git-send-email-bmeng.cn@gmail.com>",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20170911_023801_910006_C4C7D779 ",
        "X-CRM114-Status": "GOOD (  13.42  )",
        "X-Spam-Score": "-2.7 (--)",
        "X-Spam-Report": "SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c0b:0:0:0:241 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (bmeng.cn[at]gmail.com)\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\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",
        "X-BeenThere": "linux-mtd@lists.infradead.org",
        "X-Mailman-Version": "2.1.21",
        "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": "Stefan Roese <sr@denx.de>",
        "MIME-Version": "1.0",
        "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": "The number of protected range registers is not the same on BYT/LPT/\nBXT. GPR0 only exists on Apollo Lake and its offset is reserved on\nother platforms.\n\nSigned-off-by: Bin Meng <bmeng.cn@gmail.com>\nAcked-by: Mika Westerberg <mika.westerberg@linux.intel.com>\n---\n\nChanges in v2: None\n\n drivers/mtd/spi-nor/intel-spi.c | 16 +++++++++++-----\n 1 file changed, 11 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/mtd/spi-nor/intel-spi.c b/drivers/mtd/spi-nor/intel-spi.c\nindex 8a596bf..e5b52e8 100644\n--- a/drivers/mtd/spi-nor/intel-spi.c\n+++ b/drivers/mtd/spi-nor/intel-spi.c\n@@ -67,8 +67,6 @@\n #define PR_LIMIT_MASK\t\t\t(0x3fff << PR_LIMIT_SHIFT)\n #define PR_RPE\t\t\t\tBIT(15)\n #define PR_BASE_MASK\t\t\t0x3fff\n-/* Last PR is GPR0 */\n-#define PR_NUM\t\t\t\t(5 + 1)\n \n /* Offsets are from @ispi->sregs */\n #define SSFSTS_CTL\t\t\t0x00\n@@ -96,14 +94,17 @@\n #define BYT_BCR\t\t\t\t0xfc\n #define BYT_BCR_WPD\t\t\tBIT(0)\n #define BYT_FREG_NUM\t\t\t5\n+#define BYT_PR_NUM\t\t\t5\n \n #define LPT_PR\t\t\t\t0x74\n #define LPT_SSFSTS_CTL\t\t\t0x90\n #define LPT_FREG_NUM\t\t\t5\n+#define LPT_PR_NUM\t\t\t5\n \n #define BXT_PR\t\t\t\t0x84\n #define BXT_SSFSTS_CTL\t\t\t0xa0\n #define BXT_FREG_NUM\t\t\t12\n+#define BXT_PR_NUM\t\t\t6\n \n #define INTEL_SPI_TIMEOUT\t\t5000 /* ms */\n #define INTEL_SPI_FIFO_SZ\t\t64\n@@ -117,6 +118,7 @@\n  * @pregs: Start of protection registers\n  * @sregs: Start of software sequencer registers\n  * @nregions: Maximum number of regions\n+ * @pr_num: Maximum number of protected range registers\n  * @writeable: Is the chip writeable\n  * @swseq: Use SW sequencer in register reads/writes\n  * @erase_64k: 64k erase supported\n@@ -132,6 +134,7 @@ struct intel_spi {\n \tvoid __iomem *pregs;\n \tvoid __iomem *sregs;\n \tsize_t nregions;\n+\tsize_t pr_num;\n \tbool writeable;\n \tbool swseq;\n \tbool erase_64k;\n@@ -167,7 +170,7 @@ static void intel_spi_dump_regs(struct intel_spi *ispi)\n \tfor (i = 0; i < ispi->nregions; i++)\n \t\tdev_dbg(ispi->dev, \"FREG(%d)=0x%08x\\n\", i,\n \t\t\treadl(ispi->base + FREG(i)));\n-\tfor (i = 0; i < PR_NUM; i++)\n+\tfor (i = 0; i < ispi->pr_num; i++)\n \t\tdev_dbg(ispi->dev, \"PR(%d)=0x%08x\\n\", i,\n \t\t\treadl(ispi->pregs + PR(i)));\n \n@@ -182,7 +185,7 @@ static void intel_spi_dump_regs(struct intel_spi *ispi)\n \t\tdev_dbg(ispi->dev, \"BCR=0x%08x\\n\", readl(ispi->base + BYT_BCR));\n \n \tdev_dbg(ispi->dev, \"Protected regions:\\n\");\n-\tfor (i = 0; i < PR_NUM; i++) {\n+\tfor (i = 0; i < ispi->pr_num; i++) {\n \t\tu32 base, limit;\n \n \t\tvalue = readl(ispi->pregs + PR(i));\n@@ -286,6 +289,7 @@ static int intel_spi_init(struct intel_spi *ispi)\n \t\tispi->sregs = ispi->base + BYT_SSFSTS_CTL;\n \t\tispi->pregs = ispi->base + BYT_PR;\n \t\tispi->nregions = BYT_FREG_NUM;\n+\t\tispi->pr_num = BYT_PR_NUM;\n \n \t\tif (writeable) {\n \t\t\t/* Disable write protection */\n@@ -305,12 +309,14 @@ static int intel_spi_init(struct intel_spi *ispi)\n \t\tispi->sregs = ispi->base + LPT_SSFSTS_CTL;\n \t\tispi->pregs = ispi->base + LPT_PR;\n \t\tispi->nregions = LPT_FREG_NUM;\n+\t\tispi->pr_num = LPT_PR_NUM;\n \t\tbreak;\n \n \tcase INTEL_SPI_BXT:\n \t\tispi->sregs = ispi->base + BXT_SSFSTS_CTL;\n \t\tispi->pregs = ispi->base + BXT_PR;\n \t\tispi->nregions = BXT_FREG_NUM;\n+\t\tispi->pr_num = BXT_PR_NUM;\n \t\tispi->erase_64k = true;\n \t\tbreak;\n \n@@ -652,7 +658,7 @@ static bool intel_spi_is_protected(const struct intel_spi *ispi,\n {\n \tint i;\n \n-\tfor (i = 0; i < PR_NUM; i++) {\n+\tfor (i = 0; i < ispi->pr_num; i++) {\n \t\tu32 pr_base, pr_limit, pr_value;\n \n \t\tpr_value = readl(ispi->pregs + PR(i));\n",
    "prefixes": [
        "v2",
        "01/10"
    ]
}