get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 805958,
    "url": "http://patchwork.ozlabs.org/api/patches/805958/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1503677551-5085-2-git-send-email-yamada.masahiro@socionext.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1503677551-5085-2-git-send-email-yamada.masahiro@socionext.com>",
    "list_archive_url": null,
    "date": "2017-08-25T16:12:30",
    "name": "[U-Boot,1/2] ofnode: add {ofnode, dev}_read_resource_byname()",
    "commit_ref": "7b8b47bd29c0d26c59e855164d23759fd1f89fc4",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d7b432e6a7a50bbac1ef1c1f0e6f06ab6d12a555",
    "submitter": {
        "id": 65882,
        "url": "http://patchwork.ozlabs.org/api/people/65882/?format=api",
        "name": "Masahiro Yamada",
        "email": "yamada.masahiro@socionext.com"
    },
    "delegate": {
        "id": 38701,
        "url": "http://patchwork.ozlabs.org/api/users/38701/?format=api",
        "username": "masahir0y",
        "first_name": "Masahiro",
        "last_name": "Yamada",
        "email": "yamada.m@jp.panasonic.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1503677551-5085-2-git-send-email-yamada.masahiro@socionext.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/805958/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/805958/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=nifty.com header.i=@nifty.com\n\theader.b=\"xLQsmWxv\"; dkim-atps=neutral"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xf5n25ZK7z9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 26 Aug 2017 02:13:26 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 7C7D3C21F7A; Fri, 25 Aug 2017 16:13:12 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 85303C21F64;\n\tFri, 25 Aug 2017 16:13:09 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid E990CC21F70; Fri, 25 Aug 2017 16:13:08 +0000 (UTC)",
            "from conuserg-09.nifty.com (conuserg-09.nifty.com [210.131.2.76])\n\tby lists.denx.de (Postfix) with ESMTPS id B789EC21F64\n\tfor <u-boot@lists.denx.de>; Fri, 25 Aug 2017 16:13:07 +0000 (UTC)",
            "from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp\n\t[122.131.185.176]) (authenticated)\n\tby conuserg-09.nifty.com with ESMTP id v7PGCg5p016083;\n\tSat, 26 Aug 2017 01:12:43 +0900"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=0.0 required=5.0 tests=T_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0",
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 conuserg-09.nifty.com v7PGCg5p016083",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com;\n\ts=dec2015msa; t=1503677563;\n\tbh=Yl0JXJSGRDfXFl8hOixKXA9GgtS7BSQbaaHzOv+D/2c=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=xLQsmWxv2XN1VDdlIruAONCg1kh6dMXBoTnVDAdoR5Nx7j/iVRG52ifMUDAIs7d9E\n\t2pjEFRI0I1D+R6hQGctV1gS8p4eS1PqfO98XkCoaGtMSEM3AeJ2fu1OGvOO10WdxSM\n\ttv4ldd7UzFzz7OJF7dt663VJULt3geS3VkSjmNFypB9eWK2ziJsOJFq8F8LhD5chfk\n\tFyDZw8TyAwKda4XqqEItoIBm+T89duH9P26cqYOiqaWLq0ljafC6ATid4z20jpaSYY\n\txppRc0OLOQdaxVGqbCtzs+602hHWvJ3/Nr+96/w0VvjzHGHShqUDI4K259Q2lOmzYq\n\tKP1MfVOHbJZSA==",
        "X-Nifty-SrcIP": "[122.131.185.176]",
        "From": "Masahiro Yamada <yamada.masahiro@socionext.com>",
        "To": "u-boot@lists.denx.de",
        "Date": "Sat, 26 Aug 2017 01:12:30 +0900",
        "Message-Id": "<1503677551-5085-2-git-send-email-yamada.masahiro@socionext.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1503677551-5085-1-git-send-email-yamada.masahiro@socionext.com>",
        "References": "<1503677551-5085-1-git-send-email-yamada.masahiro@socionext.com>",
        "Subject": "[U-Boot] [PATCH 1/2] ofnode: add {ofnode,\n\tdev}_read_resource_byname()",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.18",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>"
    },
    "content": "Linux supports platform_get_resource_byname() to look up a resource\nby name.\n\nWe want a similar helper.  It is useful when a device node has two\nor more named register regions.\n\nSigned-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n---\n\n drivers/core/ofnode.c | 12 ++++++++++++\n drivers/core/read.c   |  6 ++++++\n include/dm/ofnode.h   |  2 ++\n include/dm/read.h     | 20 +++++++++++++++++++-\n 4 files changed, 39 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c\nindex c1a2e9f0daef..0685b689d846 100644\n--- a/drivers/core/ofnode.c\n+++ b/drivers/core/ofnode.c\n@@ -627,3 +627,15 @@ int ofnode_read_resource(ofnode node, uint index, struct resource *res)\n \t\treturn 0;\n \t}\n }\n+\n+int ofnode_read_resource_byname(ofnode node, const char *name,\n+\t\t\t\tstruct resource *res)\n+{\n+\tint index;\n+\n+\tindex = ofnode_stringlist_search(node, \"reg-names\", name);\n+\tif (index < 0)\n+\t\treturn index;\n+\n+\treturn ofnode_read_resource(node, index, res);\n+}\ndiff --git a/drivers/core/read.c b/drivers/core/read.c\nindex fe40bed64de3..6acb33388f56 100644\n--- a/drivers/core/read.c\n+++ b/drivers/core/read.c\n@@ -164,3 +164,9 @@ int dev_read_resource(struct udevice *dev, uint index, struct resource *res)\n {\n \treturn ofnode_read_resource(dev_ofnode(dev), index, res);\n }\n+\n+int dev_read_resource_byname(struct udevice *dev, const char *name,\n+\t\t\t     struct resource *res)\n+{\n+\treturn ofnode_read_resource_byname(dev_ofnode(dev), name, res);\n+}\ndiff --git a/include/dm/ofnode.h b/include/dm/ofnode.h\nindex 210ddb2e5d74..de2769ed5376 100644\n--- a/include/dm/ofnode.h\n+++ b/include/dm/ofnode.h\n@@ -625,5 +625,7 @@ int ofnode_read_simple_size_cells(ofnode node);\n bool ofnode_pre_reloc(ofnode node);\n \n int ofnode_read_resource(ofnode node, uint index, struct resource *res);\n+int ofnode_read_resource_byname(ofnode node, const char *name,\n+\t\t\t\tstruct resource *res);\n \n #endif\ndiff --git a/include/dm/read.h b/include/dm/read.h\nindex c3a4a5611a70..49d69c990f6e 100644\n--- a/include/dm/read.h\n+++ b/include/dm/read.h\n@@ -359,13 +359,24 @@ int dev_read_enabled(struct udevice *dev);\n /**\n  * dev_read_resource() - obtain an indexed resource from a device.\n  *\n- * @dev: devuce to examine\n+ * @dev: device to examine\n  * @index index of the resource to retrieve (0 = first)\n  * @res returns the resource\n  * @return 0 if ok, negative on error\n  */\n int dev_read_resource(struct udevice *dev, uint index, struct resource *res);\n \n+/**\n+ * dev_read_resource_byname() - obtain a named resource from a device.\n+ *\n+ * @dev: device to examine\n+ * @name: name of the resource to retrieve\n+ * @res: returns the resource\n+ * @return 0 if ok, negative on error\n+ */\n+int dev_read_resource_byname(struct udevice *dev, const char *name,\n+\t\t\t     struct resource *res);\n+\n #else /* CONFIG_DM_DEV_READ_INLINE is enabled */\n \n static inline int dev_read_u32_default(struct udevice *dev,\n@@ -513,6 +524,13 @@ static inline int dev_read_resource(struct udevice *dev, uint index,\n \treturn ofnode_read_resource(dev_ofnode(dev), index, res);\n }\n \n+static inline int dev_read_resource_byname(struct udevice *dev,\n+\t\t\t\t\t   const char *name,\n+\t\t\t\t\t   struct resource *res)\n+{\n+\treturn ofnode_read_resource_byname(dev_ofnode(dev), name, res);\n+}\n+\n #endif /* CONFIG_DM_DEV_READ_INLINE */\n \n /**\n",
    "prefixes": [
        "U-Boot",
        "1/2"
    ]
}