get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 633502,
    "url": "http://patchwork.ozlabs.org/api/patches/633502/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/1465535032-26749-5-git-send-email-gwshan@linux.vnet.ibm.com/",
    "project": {
        "id": 44,
        "url": "http://patchwork.ozlabs.org/api/projects/44/?format=api",
        "name": "skiboot firmware development",
        "link_name": "skiboot",
        "list_id": "skiboot.lists.ozlabs.org",
        "list_email": "skiboot@lists.ozlabs.org",
        "web_url": "http://github.com/open-power/skiboot",
        "scm_url": "http://github.com/open-power/skiboot",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1465535032-26749-5-git-send-email-gwshan@linux.vnet.ibm.com>",
    "list_archive_url": null,
    "date": "2016-06-10T05:03:33",
    "name": "[v12,04/23] core/fdt: Allow to specify FDT blob",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "2a3a659dcfd1d6678964df15b27afbb14b4d33ea",
    "submitter": {
        "id": 63923,
        "url": "http://patchwork.ozlabs.org/api/people/63923/?format=api",
        "name": "Gavin Shan",
        "email": "gwshan@linux.vnet.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/1465535032-26749-5-git-send-email-gwshan@linux.vnet.ibm.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/633502/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/633502/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "skiboot@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "skiboot@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3rQqqb3q1pz9s5w\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 10 Jun 2016 15:05:15 +1000 (AEST)",
            "from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3rQqqb34d0zDqNn\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 10 Jun 2016 15:05:15 +1000 (AEST)",
            "from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3rQqqF3t1vzDq5s\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 15:04:57 +1000 (AEST)",
            "from pps.filterd (m0098413.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id\n\tu5A53sOG031117\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 01:04:54 -0400",
            "from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 23fm6eawgk-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 01:04:54 -0400",
            "from localhost\n\tby e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <skiboot@lists.ozlabs.org> from <gwshan@linux.vnet.ibm.com>;\n\tFri, 10 Jun 2016 15:04:51 +1000",
            "from d23dlp03.au.ibm.com (202.81.31.214)\n\tby e23smtp08.au.ibm.com (202.81.31.205) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tFri, 10 Jun 2016 15:04:49 +1000",
            "from d23relay07.au.ibm.com (d23relay07.au.ibm.com [9.190.26.37])\n\tby d23dlp03.au.ibm.com (Postfix) with ESMTP id A0AB73578058\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 15:04:33 +1000 (EST)",
            "from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138])\n\tby d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n\tu5A54Sfb4850064\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 15:04:33 +1000",
            "from d23av02.au.ibm.com (localhost [127.0.0.1])\n\tby d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id\n\tu5A54Mts024440\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 15:04:23 +1000",
            "from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14])\n\tby d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id\n\tu5A54MJn024431; Fri, 10 Jun 2016 15:04:22 +1000",
            "from bran.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114])\n\tby ozlabs.au.ibm.com (Postfix) with ESMTP id 218B3A011C;\n\tFri, 10 Jun 2016 15:03:56 +1000 (AEST)",
            "from gwshan (shangw.ozlabs.ibm.com [10.61.2.199])\n\tby bran.ozlabs.ibm.com (Postfix) with ESMTP id 07FBFE3B1A;\n\tFri, 10 Jun 2016 15:03:56 +1000 (AEST)",
            "by gwshan (Postfix, from userid 1000)\n\tid E2208942CA3; Fri, 10 Jun 2016 15:03:55 +1000 (AEST)"
        ],
        "X-IBM-Helo": "d23dlp03.au.ibm.com",
        "X-IBM-MailFrom": "gwshan@linux.vnet.ibm.com",
        "X-IBM-RcptTo": "skiboot@lists.ozlabs.org",
        "From": "Gavin Shan <gwshan@linux.vnet.ibm.com>",
        "To": "skiboot@lists.ozlabs.org",
        "Date": "Fri, 10 Jun 2016 15:03:33 +1000",
        "X-Mailer": "git-send-email 2.1.0",
        "In-Reply-To": "<1465535032-26749-1-git-send-email-gwshan@linux.vnet.ibm.com>",
        "References": "<1465535032-26749-1-git-send-email-gwshan@linux.vnet.ibm.com>",
        "X-TM-AS-MML": "disable",
        "X-Content-Scanned": "Fidelis XPS MAILER",
        "x-cbid": "16061005-0048-0000-0000-00000190496A",
        "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused",
        "x-cbparentid": "16061005-0049-0000-0000-000045E8DB65",
        "Message-Id": "<1465535032-26749-5-git-send-email-gwshan@linux.vnet.ibm.com>",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2016-06-10_04:, , signatures=0",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=1\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000\n\tdefinitions=main-1606100058",
        "Subject": "[Skiboot] [PATCH v12 04/23] core/fdt: Allow to specify FDT blob",
        "X-BeenThere": "skiboot@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.22",
        "Precedence": "list",
        "List-Id": "Mailing list for skiboot development <skiboot.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/skiboot/>",
        "List-Post": "<mailto:skiboot@lists.ozlabs.org>",
        "List-Help": "<mailto:skiboot-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>",
        "Cc": "alistair@popple.id.au",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"
    },
    "content": "There is a static variable @fdt pointing the FDT blob. The memory\nblock is allocated by skiboot. After the device tree is flattened,\nit's passed to kernel when it's loaded. It works fine. The FDT blob\nfor device sub-tree because of PCI hot add is allocated by kernel,\nusing a static @fdt to dereferencing the FDT blob isn't correct any\nmore.\n\nThis adds @fdt argument to various functions to specify the target\nFDT blob memory block. As a result, the file scoped static variable\n@fdt is removed.\n\nSigned-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>\n---\n core/fdt.c | 40 ++++++++++++++++++++--------------------\n 1 file changed, 20 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/core/fdt.c b/core/fdt.c\nindex a934e08..6d8130d 100644\n--- a/core/fdt.c\n+++ b/core/fdt.c\n@@ -27,7 +27,6 @@\n #include <ccan/str/str.h>\n \n static int fdt_error;\n-static void *fdt;\n \n #undef DEBUG_FDT\n #ifdef DEBUG_FDT\n@@ -47,12 +46,12 @@ static void __save_err(int err, const char *str)\n \n #define save_err(...) __save_err(__VA_ARGS__, #__VA_ARGS__)\n \n-static void dt_property_cell(const char *name, u32 cell)\n+static void dt_property_cell(void *fdt, const char *name, u32 cell)\n {\n \tsave_err(fdt_property_cell(fdt, name, cell));\n }\n \n-static void dt_begin_node(const struct dt_node *dn)\n+static void dt_begin_node(void *fdt, const struct dt_node *dn)\n {\n \tsave_err(fdt_begin_node(fdt, dn->name));\n \n@@ -60,22 +59,22 @@ static void dt_begin_node(const struct dt_node *dn)\n \t * We add both the new style \"phandle\" and the legacy\n \t * \"linux,phandle\" properties\n \t */\n-\tdt_property_cell(\"linux,phandle\", dn->phandle);\n-\tdt_property_cell(\"phandle\", dn->phandle);\n+\tdt_property_cell(fdt, \"linux,phandle\", dn->phandle);\n+\tdt_property_cell(fdt, \"phandle\", dn->phandle);\n }\n \n-static void dt_property(const struct dt_property *p)\n+static void dt_property(void *fdt, const struct dt_property *p)\n {\n \tsave_err(fdt_property(fdt, p->name, p->prop, p->len));\n }\n \n-static void dt_end_node(void)\n+static void dt_end_node(void *fdt)\n {\n \tsave_err(fdt_end_node(fdt));\n }\n \n #ifdef DEBUG_FDT\n-static void dump_fdt(void)\n+static void dump_fdt(void *fdt)\n {\n \tint i, off, depth, err;\n \n@@ -115,10 +114,10 @@ static void dump_fdt(void)\n \t}\n }\n #else\n-static inline void dump_fdt(void) { }\n+static inline void dump_fdt(void *fdt __unused) { }\n #endif\n \n-static void flatten_dt_properties(const struct dt_node *dn)\n+static void flatten_dt_properties(void *fdt, const struct dt_node *dn)\n {\n \tconst struct dt_property *p;\n \n@@ -127,24 +126,24 @@ static void flatten_dt_properties(const struct dt_node *dn)\n \t\t\tcontinue;\n \n \t\tFDT_DBG(\"  prop: %s size: %ld\\n\", p->name, p->len);\n-\t\tdt_property(p);\n+\t\tdt_property(fdt, p);\n \t}\n }\n \n-static void flatten_dt_node(const struct dt_node *root)\n+static void flatten_dt_node(void *fdt, const struct dt_node *root)\n {\n \tconst struct dt_node *i;\n \n \tFDT_DBG(\"node: %s\\n\", root->name);\n-\tdt_begin_node(root);\n-\tflatten_dt_properties(root);\n+\tdt_begin_node(fdt, root);\n+\tflatten_dt_properties(fdt, root);\n \tlist_for_each(&root->children, i, list)\n-\t\tflatten_dt_node(i);\n+\t\tflatten_dt_node(fdt, i);\n \n-\tdt_end_node();\n+\tdt_end_node(fdt);\n }\n \n-static void create_dtb_reservemap(const struct dt_node *root)\n+static void create_dtb_reservemap(void *fdt, const struct dt_node *root)\n {\n \tuint64_t base, size;\n \tconst uint64_t *ranges;\n@@ -168,6 +167,7 @@ static void create_dtb_reservemap(const struct dt_node *root)\n \n void *create_dtb(const struct dt_node *root)\n {\n+\tvoid *fdt = NULL;\n \tsize_t len = DEVICE_TREE_MAX_SIZE;\n \tuint32_t old_last_phandle = last_phandle;\n \n@@ -184,10 +184,10 @@ void *create_dtb(const struct dt_node *root)\n \n \t\tfdt_create(fdt, len);\n \n-\t\tcreate_dtb_reservemap(root);\n+\t\tcreate_dtb_reservemap(fdt, root);\n \n \t\t/* Unflatten our live tree */\n-\t\tflatten_dt_node(root);\n+\t\tflatten_dt_node(fdt, root);\n \n \t\tsave_err(fdt_finish(fdt));\n \n@@ -197,7 +197,7 @@ void *create_dtb(const struct dt_node *root)\n \t\tlen *= 2;\n \t} while (fdt_error == -FDT_ERR_NOSPACE);\n \n-\tdump_fdt();\n+\tdump_fdt(fdt);\n \n \tif (fdt_error) {\n \t\tprerror(\"dtb: error %s\\n\", fdt_strerror(fdt_error));\n",
    "prefixes": [
        "v12",
        "04/23"
    ]
}