get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 806170,
    "url": "http://patchwork.ozlabs.org/api/patches/806170/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170826225110.7381-10-xypron.glpk@gmx.de/",
    "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": "<20170826225110.7381-10-xypron.glpk@gmx.de>",
    "list_archive_url": null,
    "date": "2017-08-26T22:51:10",
    "name": "[U-Boot,09/23] efi_loader: simplify efi_uninstall_protocol_interface",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "dfe359f895b9434d50924a3ca2dc37a88e11d104",
    "submitter": {
        "id": 61270,
        "url": "http://patchwork.ozlabs.org/api/people/61270/?format=api",
        "name": "Heinrich Schuchardt",
        "email": "xypron.glpk@gmx.de"
    },
    "delegate": {
        "id": 3400,
        "url": "http://patchwork.ozlabs.org/api/users/3400/?format=api",
        "username": "agraf",
        "first_name": "Alexander",
        "last_name": "Graf",
        "email": "agraf@suse.de"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170826225110.7381-10-xypron.glpk@gmx.de/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/806170/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/806170/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>)",
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xftj1521lz9s78\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 27 Aug 2017 08:57:41 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 525E7C2218C; Sat, 26 Aug 2017 22:54:17 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 41E62C221E4;\n\tSat, 26 Aug 2017 22:52:47 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 868F5C221D9; Sat, 26 Aug 2017 22:52:13 +0000 (UTC)",
            "from mout.gmx.net (mout.gmx.net [212.227.17.20])\n\tby lists.denx.de (Postfix) with ESMTPS id 4E944C2211F\n\tfor <u-boot@lists.denx.de>; Sat, 26 Aug 2017 22:52:09 +0000 (UTC)",
            "from localhost.localdomain ([84.118.154.110]) by mail.gmx.com\n\t(mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id\n\t0M1iGk-1dWfqQ2hg2-00tiIu; Sun, 27 Aug 2017 00:51:24 +0200"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-0.7 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL autolearn=unavailable\n\tautolearn_force=no version=3.4.0",
        "From": "Heinrich Schuchardt <xypron.glpk@gmx.de>",
        "To": "Alexander Graf <agraf@suse.de>",
        "Date": "Sun, 27 Aug 2017 00:51:10 +0200",
        "Message-Id": "<20170826225110.7381-10-xypron.glpk@gmx.de>",
        "X-Mailer": "git-send-email 2.14.1",
        "In-Reply-To": "<20170826225110.7381-1-xypron.glpk@gmx.de>",
        "References": "<20170826225110.7381-1-xypron.glpk@gmx.de>",
        "X-Provags-ID": "V03:K0:K70GPRta6ESGwUxjJhf1ckUaX2DdTOtNbwvTFl9UBAojGlF0lVO\n\t/Sp+Oj0RZ8GyDZ4soONrsxX9l6qnz9UxyHqTZqUd2GyCRhlHb9oAFWEXOGvLYRXiBl7aiRO\n\twvjehuq/taVu7b6K30qffNJukmzZaFB4uds9p8jSo1fvoBB9I3KZ76WACoSHqk8A28NrBPo\n\ta8Zr/Mgt2wy8AgvHMxNGg==",
        "X-UI-Out-Filterresults": "notjunk:1; V01:K0:7Pt6ki5J53E=:ElqcVQ+K4Sm/TNYvIy4YYI\n\tNqLiDaXsLPguXdvKmA/jU++b8pd/+ttBNIyVtHDeZyAdIsA6Q2J7J9BFp2Qr6GG3y56M6/lOt\n\t9HJAJqua9p0LX+Y6tUzo6dAsJC4Gz6l+5LX1T/Saxcs/+KylTcHDbc8rzYIdEpM/ai8hAifM5\n\tIppDWxCgMgq+kfMA/RjOl319j1d5HGcLdxdlkT8hFY1/f1IyEVi2PCk5ze5e6xIzyE99XDGNV\n\tGciqKyU4ehFIQ/Ox8ihlQKzvhc6v872cvLOvnJ1kBworoKH7VaF0R6vL06XKqRYolddyixS4U\n\tD124cCLO10AGeRFl45EcqDHo6cqRY32x4Ak1xiMEs1PalvF/alpVZVcHKB5DdPsLj7rhZeVsw\n\t4faoof+sZJxqZ5jcasfxkSJvoi0gyvumik8VZd3BNvb5+UyJywc2+U6SFQitVf5U7M/xabbi5\n\tGNQR+7yO6wdkN229v4CsB869eX/tmRC7BXOb+8KMrpRDKKk2szzBUtJTfF+LvuMsaEOiP9zSn\n\tnQjjrCXtK1+S2OcfSQOPM3z5OSfwmb20hnu5bP4P7G/j9uJm4aQ87CKH7VEpCwUGxGkIGKiDM\n\tBc7c982QbsPL4YT6TaTT4nleXOJZx0qS0JFAZMeacQH8DpqIGWkOa2YzVuG50oiK2u/Jmn18X\n\tuTJiOK31fIjJKGskdIM5t+cl9D8yml6Og7Ji0axqy/hChC90Ps/WEfM91wj/gF0L9u76SzUFF\n\tKkCZO3aaJx4QyQxpRLr8CV6XTjOmtwoXTUi3Rng6KCeOSV0VPIO05RWNMcDXwRMP3sDDssunz\n\tpAvcjRy57tfClkxMa5mqgc2pg7OeA==",
        "Cc": "Heinrich Schuchardt <xypron.glpk@gmx.de>, u-boot@lists.denx.de",
        "Subject": "[U-Boot] [PATCH 09/23] efi_loader: simplify\n\tefi_uninstall_protocol_interface",
        "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": "Use function efi_search_obj and efi_search_protocol\nto simplify the coding.\n\nDo away with efi_uninstall_protocol_interface_ext.\nWe can use EFI_CALL for internal usage.\n\nSigned-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n---\n lib/efi_loader/efi_boottime.c | 56 ++++++++++++++-----------------------------\n 1 file changed, 18 insertions(+), 38 deletions(-)",
    "diff": "diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\nindex 9f8d64659f..a483b827cd 100644\n--- a/lib/efi_loader/efi_boottime.c\n+++ b/lib/efi_loader/efi_boottime.c\n@@ -562,51 +562,31 @@ static efi_status_t EFIAPI efi_reinstall_protocol_interface(void *handle,\n static efi_status_t EFIAPI efi_uninstall_protocol_interface(void *handle,\n \t\t\tefi_guid_t *protocol, void *protocol_interface)\n {\n-\tstruct list_head *lhandle;\n-\tint i;\n-\tefi_status_t r = EFI_NOT_FOUND;\n+\tstruct efi_handler *handler;\n+\tefi_status_t r;\n+\n+\tEFI_ENTRY(\"%p, %p, %p\", handle, protocol, protocol_interface);\n \n \tif (!handle || !protocol) {\n \t\tr = EFI_INVALID_PARAMETER;\n \t\tgoto out;\n \t}\n \n-\tlist_for_each(lhandle, &efi_obj_list) {\n-\t\tstruct efi_object *efiobj;\n-\t\tefiobj = list_entry(lhandle, struct efi_object, link);\n-\n-\t\tif (efiobj->handle != handle)\n-\t\t\tcontinue;\n-\n-\t\tfor (i = 0; i < ARRAY_SIZE(efiobj->protocols); i++) {\n-\t\t\tstruct efi_handler *handler = &efiobj->protocols[i];\n-\t\t\tconst efi_guid_t *hprotocol = handler->guid;\n+\t/* Find the protocol on the handle */\n+\tr = efi_search_protocol(handle, protocol, &handler);\n+\tif (r != EFI_SUCCESS)\n+\t\tgoto out;\n \n-\t\t\tif (!hprotocol)\n-\t\t\t\tcontinue;\n-\t\t\tif (!guidcmp(hprotocol, protocol)) {\n-\t\t\t\tif (handler->protocol_interface) {\n-\t\t\t\t\tr = EFI_ACCESS_DENIED;\n-\t\t\t\t} else {\n-\t\t\t\t\thandler->guid = 0;\n-\t\t\t\t\tr = EFI_SUCCESS;\n-\t\t\t\t}\n-\t\t\t\tgoto out;\n-\t\t\t}\n-\t\t}\n+\tif (handler->protocol_interface) {\n+\t\t/* Disconnect controllers */\n+\t\tr =  EFI_ACCESS_DENIED;\n+\t} else {\n+\t\thandler->guid = 0;\n+\t\tr = EFI_SUCCESS;\n \t}\n \n out:\n-\treturn r;\n-}\n-\n-static efi_status_t EFIAPI efi_uninstall_protocol_interface_ext(void *handle,\n-\t\t\tefi_guid_t *protocol, void *protocol_interface)\n-{\n-\tEFI_ENTRY(\"%p, %p, %p\", handle, protocol, protocol_interface);\n-\n-\treturn EFI_EXIT(efi_uninstall_protocol_interface(handle, protocol,\n-\t\t\t\t\t\t\t protocol_interface));\n+\treturn EFI_EXIT(r);\n }\n \n static efi_status_t EFIAPI efi_register_protocol_notify(efi_guid_t *protocol,\n@@ -1135,8 +1115,8 @@ static efi_status_t EFIAPI efi_install_multiple_protocol_interfaces(\n \tfor (; i; --i) {\n \t\tprotocol = va_arg(argptr, efi_guid_t*);\n \t\tprotocol_interface = va_arg(argptr, void*);\n-\t\tefi_uninstall_protocol_interface(handle, protocol,\n-\t\t\t\t\t\t protocol_interface);\n+\t\tEFI_CALL(efi_uninstall_protocol_interface(handle, protocol,\n+\t\t\t\t\t\t\t  protocol_interface));\n \t}\n \tva_end(argptr);\n \n@@ -1269,7 +1249,7 @@ static const struct efi_boot_services efi_boot_services = {\n \t.check_event = efi_check_event,\n \t.install_protocol_interface = efi_install_protocol_interface,\n \t.reinstall_protocol_interface = efi_reinstall_protocol_interface,\n-\t.uninstall_protocol_interface = efi_uninstall_protocol_interface_ext,\n+\t.uninstall_protocol_interface = efi_uninstall_protocol_interface,\n \t.handle_protocol = efi_handle_protocol,\n \t.reserved = NULL,\n \t.register_protocol_notify = efi_register_protocol_notify,\n",
    "prefixes": [
        "U-Boot",
        "09/23"
    ]
}