get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 807276,
    "url": "http://patchwork.ozlabs.org/api/patches/807276/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170829201601.64312-4-sjg@chromium.org/",
    "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": "<20170829201601.64312-4-sjg@chromium.org>",
    "list_archive_url": null,
    "date": "2017-08-29T20:15:48",
    "name": "[U-Boot,v2,03/16] dtoc: Add a 64-bit type and a way to convert cells into 64 bits",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "3b151d5c64c2a817c642c30ded6fc1ccb937525a",
    "submitter": {
        "id": 6170,
        "url": "http://patchwork.ozlabs.org/api/people/6170/?format=api",
        "name": "Simon Glass",
        "email": "sjg@chromium.org"
    },
    "delegate": {
        "id": 3184,
        "url": "http://patchwork.ozlabs.org/api/users/3184/?format=api",
        "username": "sjg",
        "first_name": "Simon",
        "last_name": "Glass",
        "email": "sjg@chromium.org"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170829201601.64312-4-sjg@chromium.org/mbox/",
    "series": [
        {
            "id": 462,
            "url": "http://patchwork.ozlabs.org/api/series/462/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=462",
            "date": "2017-08-29T20:15:45",
            "name": "dtoc: Add support for 64-bit addresses",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/462/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/807276/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/807276/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=google.com header.i=@google.com\n\theader.b=\"TlQjhSmM\"; dkim-atps=neutral"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xhg7S32Y0z9sQl\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 06:23:16 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 0B3ECC226C5; Tue, 29 Aug 2017 20:18:58 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 5B7A5C225BA;\n\tTue, 29 Aug 2017 20:16:42 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 5660AC22602; Tue, 29 Aug 2017 20:16:18 +0000 (UTC)",
            "from mail-oi0-f50.google.com (mail-oi0-f50.google.com\n\t[209.85.218.50])\n\tby lists.denx.de (Postfix) with ESMTPS id 90D05C225AB\n\tfor <u-boot@lists.denx.de>; Tue, 29 Aug 2017 20:16:14 +0000 (UTC)",
            "by mail-oi0-f50.google.com with SMTP id k77so36399832oib.2\n\tfor <u-boot@lists.denx.de>; Tue, 29 Aug 2017 13:16:14 -0700 (PDT)",
            "from kiwi.bld.corp.google.com ([100.101.164.89])\n\tby smtp.gmail.com with ESMTPSA id\n\te184sm4032429oih.35.2017.08.29.13.16.10\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 29 Aug 2017 13:16:12 -0700 (PDT)",
            "by kiwi.bld.corp.google.com (Postfix, from userid 121222)\n\tid C7F6313FC5F; Tue, 29 Aug 2017 14:16:09 -0600 (MDT)"
        ],
        "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=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=haBOpWoD43Oy3HrMplmjgXDkLGMwHCnDSInV9CrEkEo=;\n\tb=TlQjhSmMJ/H3ivymwmrLUeJQOThO7/IXmoDa8X7ZdvURHssrtlQuM6rlZx7EGHVwCD\n\th5bmZdNZrhDocHCHrbQ++B1lIaj5rXBDbk+i3lsWispY99jGCanmV893qff7g9UyFYSp\n\tPas01dAHMqgqd8nDu1TiBVWpLxEro7wSkxkudc0sQ6/x4//ZZ56WJZ8Cfr/7OY2Opm7c\n\tmxYxdbsOwFh1YSuZ/VsZ5t2e9Ljj++6gccAiWalyl4iP1M7CMcDSv9X3jJHhyTb+Mn5n\n\tiNJzrwMiA/2vxWLnRDLwKMrJ9RLD2TPejoOhKbpUw06EWMTwws2x3ZwF7bZeL3vETqBK\n\t73gg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references;\n\tbh=haBOpWoD43Oy3HrMplmjgXDkLGMwHCnDSInV9CrEkEo=;\n\tb=G71T9ZoJTipSS82qpfd0jQqoYwX6h9JQ8WSvBv4OAixG05Mpm+RLZH8b8FeRYrxyIJ\n\tiJu8P7VSbyj5Km5F4Htssoe6WRLDjVUT3pVymctlWQtyDT/Q8i+khh2k7lRswq+5Cfv7\n\tPzv4q3dODDHO6LGvM74fOCtEvNlLyHL8wj7MLTxJXqG2/2YgVuJOm3re9Zu68bg2HI7+\n\t5NQR1AFVmXz4yk2KbXRgFtOHSHEjskH3TbEYx6eQ5F7XgKQ2pVJ6lte/s+snRtc+Lzsm\n\tK3PSa7mBgH00vgfPiyfEiyA2h+Qh9n/kYbWqHsosnENX/V5jk9GjyehhUmrIITD2Du37\n\tGPQQ==",
        "X-Gm-Message-State": "AHYfb5gc3jx8cBUkr15hEtTqBiqXeILuKhl+3GMq1kgzCewvuuo5+0JJ\n\tgzUjy6oIH1GB34ah",
        "X-Google-Smtp-Source": "ADKCNb5dmGIKkgdMPSApbLz2eiK0ehmaEI8PLDZQYQMGiZCbdmQv3e02rD3nJWY1tVHUPsSr9FEq6A==",
        "X-Received": "by 10.202.44.10 with SMTP id s10mr1460940ois.256.1504037773053; \n\tTue, 29 Aug 2017 13:16:13 -0700 (PDT)",
        "From": "Simon Glass <sjg@chromium.org>",
        "To": "U-Boot Mailing List <u-boot@lists.denx.de>",
        "Date": "Tue, 29 Aug 2017 14:15:48 -0600",
        "Message-Id": "<20170829201601.64312-4-sjg@chromium.org>",
        "X-Mailer": "git-send-email 2.14.1.342.g6490525c54-goog",
        "In-Reply-To": "<20170829201601.64312-1-sjg@chromium.org>",
        "References": "<20170829201601.64312-1-sjg@chromium.org>",
        "Cc": "Tom Rini <trini@konsulko.com>",
        "Subject": "[U-Boot] [PATCH v2 03/16] dtoc: Add a 64-bit type and a way to\n\tconvert cells into 64 bits",
        "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": "When dealing with multi-cell values we need a type that can hold this\nvalue. Add this and a function to process it from a list of cell values.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\nReviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>\nTested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>\n---\n\nChanges in v2: None\n\n tools/dtoc/dtb_platdata.py |  3 +++\n tools/dtoc/fdt.py          |  2 +-\n tools/dtoc/fdt_util.py     | 14 ++++++++++++++\n 3 files changed, 18 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py\nindex 041a33188f..4a1162a9fa 100644\n--- a/tools/dtoc/dtb_platdata.py\n+++ b/tools/dtoc/dtb_platdata.py\n@@ -38,6 +38,7 @@ TYPE_NAMES = {\n     fdt.TYPE_BYTE: 'unsigned char',\n     fdt.TYPE_STRING: 'const char *',\n     fdt.TYPE_BOOL: 'bool',\n+    fdt.TYPE_INT64: 'fdt64_t',\n }\n \n STRUCT_PREFIX = 'dtd_'\n@@ -95,6 +96,8 @@ def get_value(ftype, value):\n         return '\"%s\"' % value\n     elif ftype == fdt.TYPE_BOOL:\n         return 'true'\n+    elif ftype == fdt.TYPE_INT64:\n+        return '%#x' % value\n \n def get_compat_name(node):\n     \"\"\"Get a node's first compatible string as a C identifier\ndiff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py\nindex 49409a62ec..ffd42ce541 100644\n--- a/tools/dtoc/fdt.py\n+++ b/tools/dtoc/fdt.py\n@@ -21,7 +21,7 @@ import libfdt\n # so it is fairly efficient.\n \n # A list of types we support\n-(TYPE_BYTE, TYPE_INT, TYPE_STRING, TYPE_BOOL) = range(4)\n+(TYPE_BYTE, TYPE_INT, TYPE_STRING, TYPE_BOOL, TYPE_INT64) = range(5)\n \n def CheckErr(errnum, msg):\n     if errnum:\ndiff --git a/tools/dtoc/fdt_util.py b/tools/dtoc/fdt_util.py\nindex b9dfae8d0e..bec6ee947a 100644\n--- a/tools/dtoc/fdt_util.py\n+++ b/tools/dtoc/fdt_util.py\n@@ -29,6 +29,20 @@ def fdt32_to_cpu(val):\n         val = val.encode('raw_unicode_escape')\n     return struct.unpack('>I', val)[0]\n \n+def fdt_cells_to_cpu(val, cells):\n+    \"\"\"Convert one or two cells to a long integer\n+\n+    Args:\n+        Value to convert (array of one or more 4-character strings)\n+\n+    Return:\n+        A native-endian long value\n+    \"\"\"\n+    out = long(fdt32_to_cpu(val[0]))\n+    if cells == 2:\n+        out = out << 32 | fdt32_to_cpu(val[1])\n+    return out\n+\n def EnsureCompiled(fname):\n     \"\"\"Compile an fdt .dts source file into a .dtb binary blob if needed.\n \n",
    "prefixes": [
        "U-Boot",
        "v2",
        "03/16"
    ]
}