get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 291433,
    "url": "http://patchwork.ozlabs.org/api/patches/291433/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1384487159-43032-2-git-send-email-fenghua@phytium.com.cn/",
    "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": "<1384487159-43032-2-git-send-email-fenghua@phytium.com.cn>",
    "list_archive_url": null,
    "date": "2013-11-15T03:45:50",
    "name": "[U-Boot,v15,01/10] fdt_support: 64bit initrd start address support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "e12af147e8e0bcd3ea32e9ff4e1bb6c1be0ef32d",
    "submitter": {
        "id": 34808,
        "url": "http://patchwork.ozlabs.org/api/people/34808/?format=api",
        "name": null,
        "email": "fenghua@phytium.com.cn"
    },
    "delegate": {
        "id": 1694,
        "url": "http://patchwork.ozlabs.org/api/users/1694/?format=api",
        "username": "aaribaud",
        "first_name": "Albert",
        "last_name": "ARIBAUD",
        "email": "albert.aribaud@free.fr"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1384487159-43032-2-git-send-email-fenghua@phytium.com.cn/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/291433/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/291433/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",
        "Received": [
            "from theia.denx.de (theia.denx.de [85.214.87.163])\n\tby ozlabs.org (Postfix) with ESMTP id A5C5A2C0094\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Nov 2013 14:47:18 +1100 (EST)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 858CD4AD4F;\n\tFri, 15 Nov 2013 04:47:07 +0100 (CET)",
            "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id LSzK9XKEdKBT; Fri, 15 Nov 2013 04:47:07 +0100 (CET)",
            "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id E46EE4AD7A;\n\tFri, 15 Nov 2013 04:46:58 +0100 (CET)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id D11A74AD4F\n\tfor <u-boot@lists.denx.de>; Fri, 15 Nov 2013 04:46:55 +0100 (CET)",
            "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Hk4AJ1o0e8pY for <u-boot@lists.denx.de>;\n\tFri, 15 Nov 2013 04:46:49 +0100 (CET)",
            "from mail.corpease.net (mail10.corpease.net [61.145.121.76])\n\tby theia.denx.de (Postfix) with ESMTP id 2463E4AD73\n\tfor <u-boot@lists.denx.de>; Fri, 15 Nov 2013 04:46:45 +0100 (CET)",
            "from localhost (unknown [220.202.153.92])\n\tby mail10.corpease.net (Coremail) with SMTP id\n\tTAGowJCL_6wYmYVSgRw2AA--.18059S3; \n\tFri, 15 Nov 2013 11:46:33 +0800 (CST)"
        ],
        "X-Virus-Scanned": [
            "Debian amavisd-new at theia.denx.de",
            "Debian amavisd-new at theia.denx.de"
        ],
        "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)",
        "From": "fenghua@phytium.com.cn",
        "To": "u-boot@lists.denx.de",
        "Date": "Fri, 15 Nov 2013 11:45:50 +0800",
        "Message-Id": "<1384487159-43032-2-git-send-email-fenghua@phytium.com.cn>",
        "X-Mailer": "git-send-email 1.7.9.5",
        "In-Reply-To": "<1384487159-43032-1-git-send-email-fenghua@phytium.com.cn>",
        "References": "<1384487159-43032-1-git-send-email-fenghua@phytium.com.cn>",
        "X-CM-TRANSID": "TAGowJCL_6wYmYVSgRw2AA--.18059S3",
        "X-Coremail-Antispam": "1UD129KBjvJXoWxJw4fCryftFWDJFW3uw17ZFb_yoW5Ww13pF\n\t4fKrZxWr1rXr9avrs0qFn7uw13Xrn5try7Jry7tr1Fk3W0yrn5Xa98K3y0vw1kJ397ZayY\n\tvw4UuFy7urn7Kr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDU0xBIdaVrnRJUUUdlb7IF0VCYb41lb7IF0VCFI7km07C26c804VAKzcIF0wAYjxAI\n\t6xZILanIXVAFwwAYjxAI6IIYrVAFwwAYjsxI4VWUJwAYFVCjjxCrM7AC8VAFwI0_Gr0_Xr\n\t1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK\n\t0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUJVWUCwA2z4\n\tx0Y4vE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26r1j6r4UM28E\n\tF7xvwVC2z280aVCY1x0267AKxVW8JVW8Jr1ln4vE4IxY62xKV4CY8xCE548m6r4UJryUGw\n\tAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCqF7xvr2I5Mc02F40EFcxC0VAKzVAqx4xG\n\t6I80ewAv7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFV\n\tCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwAKzVCY\n\t07xG64k0F24lc2xSY4AK67AK6r48MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r\n\t1j6r4UMxCIbVAxMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWl\n\tx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r\n\t1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Gr0_\n\tZr1lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCT\n\tnIWIevJa73UjIFyTuYvj7q7JbAUUUUU",
        "X-Originating-IP": "[220.202.153.92]",
        "X-CM-SenderInfo": "pihqwxdxd61x51wl3zoofrzhdfq/",
        "Cc": "trini@ti.com, scottwood@freescale.com",
        "Subject": "[U-Boot] [PATCH v15 01/10] fdt_support: 64bit initrd start address\n\tsupport",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.11",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<http://lists.denx.de/mailman/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": "<http://lists.denx.de/mailman/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "u-boot-bounces@lists.denx.de",
        "Errors-To": "u-boot-bounces@lists.denx.de"
    },
    "content": "From: David Feng <fenghua@phytium.com.cn>\n\nSigned-off-by: David Feng <fenghua@phytium.com.cn>\n---\n common/fdt_support.c |   66 ++++++++++++++++++++++++++------------------------\n 1 file changed, 34 insertions(+), 32 deletions(-)",
    "diff": "diff --git a/common/fdt_support.c b/common/fdt_support.c\nindex 1f0d8f5..a3f7442 100644\n--- a/common/fdt_support.c\n+++ b/common/fdt_support.c\n@@ -21,6 +21,34 @@\n  */\n DECLARE_GLOBAL_DATA_PTR;\n \n+/*\n+ * Get cells len in bytes\n+ *     if #NNNN-cells property is 2 then len is 8\n+ *     otherwise len is 4\n+ */\n+static int get_cells_len(void *blob, char *nr_cells_name)\n+{\n+\tconst fdt32_t *cell;\n+\n+\tcell = fdt_getprop(blob, 0, nr_cells_name, NULL);\n+\tif (cell && fdt32_to_cpu(*cell) == 2)\n+\t\treturn 8;\n+\n+\treturn 4;\n+}\n+\n+/*\n+ * Write a 4 or 8 byte big endian cell\n+ */\n+static void write_cell(u8 *addr, u64 val, int size)\n+{\n+\tint shift = (size - 1) * 8;\n+\twhile (size-- > 0) {\n+\t\t*addr++ = (val >> shift) & 0xff;\n+\t\tshift -= 8;\n+\t}\n+}\n+\n /**\n  * fdt_getprop_u32_default - Find a node and return it's property or a default\n  *\n@@ -131,9 +159,9 @@ static int fdt_fixup_stdout(void *fdt, int chosenoff)\n \n int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force)\n {\n-\tint   nodeoffset;\n+\tint   nodeoffset, addr_cell_len;\n \tint   err, j, total;\n-\tfdt32_t  tmp;\n+\tfdt64_t  tmp;\n \tconst char *path;\n \tuint64_t addr, size;\n \n@@ -170,9 +198,11 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force)\n \t\treturn err;\n \t}\n \n+\taddr_cell_len = get_cells_len(fdt, \"#address-cells\");\n+\n \tpath = fdt_getprop(fdt, nodeoffset, \"linux,initrd-start\", NULL);\n \tif ((path == NULL) || force) {\n-\t\ttmp = cpu_to_fdt32(initrd_start);\n+\t\twrite_cell((u8 *)&tmp, initrd_start, addr_cell_len);\n \t\terr = fdt_setprop(fdt, nodeoffset,\n \t\t\t\"linux,initrd-start\", &tmp, sizeof(tmp));\n \t\tif (err < 0) {\n@@ -181,7 +211,7 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force)\n \t\t\t\tfdt_strerror(err));\n \t\t\treturn err;\n \t\t}\n-\t\ttmp = cpu_to_fdt32(initrd_end);\n+\t\twrite_cell((u8 *)&tmp, initrd_end, addr_cell_len);\n \t\terr = fdt_setprop(fdt, nodeoffset,\n \t\t\t\"linux,initrd-end\", &tmp, sizeof(tmp));\n \t\tif (err < 0) {\n@@ -343,34 +373,6 @@ void do_fixup_by_compat_u32(void *fdt, const char *compat,\n \tdo_fixup_by_compat(fdt, compat, prop, &tmp, 4, create);\n }\n \n-/*\n- * Get cells len in bytes\n- *     if #NNNN-cells property is 2 then len is 8\n- *     otherwise len is 4\n- */\n-static int get_cells_len(void *blob, char *nr_cells_name)\n-{\n-\tconst fdt32_t *cell;\n-\n-\tcell = fdt_getprop(blob, 0, nr_cells_name, NULL);\n-\tif (cell && fdt32_to_cpu(*cell) == 2)\n-\t\treturn 8;\n-\n-\treturn 4;\n-}\n-\n-/*\n- * Write a 4 or 8 byte big endian cell\n- */\n-static void write_cell(u8 *addr, u64 val, int size)\n-{\n-\tint shift = (size - 1) * 8;\n-\twhile (size-- > 0) {\n-\t\t*addr++ = (val >> shift) & 0xff;\n-\t\tshift -= 8;\n-\t}\n-}\n-\n #ifdef CONFIG_NR_DRAM_BANKS\n #define MEMORY_BANKS_MAX CONFIG_NR_DRAM_BANKS\n #else\n",
    "prefixes": [
        "U-Boot",
        "v15",
        "01/10"
    ]
}