get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 793667,
    "url": "http://patchwork.ozlabs.org/api/patches/793667/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170725214427.25768-5-robh@kernel.org/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20170725214427.25768-5-robh@kernel.org>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170725214427.25768-5-robh@kernel.org/",
    "date": "2017-07-25T21:44:27",
    "name": "[4/4] of/fdt: only store the device node basename in full_name",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "13376ad434d6bb42b8ceb3be6e102411831186e2",
    "submitter": {
        "id": 62529,
        "url": "http://patchwork.ozlabs.org/api/people/62529/?format=api",
        "name": "Rob Herring",
        "email": "robh@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170725214427.25768-5-robh@kernel.org/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/793667/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/793667/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xHBm44QtVz9sN7\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 26 Jul 2017 07:52:04 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xHBm43PY9zDqnD\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 26 Jul 2017 07:52:04 +1000 (AEST)",
            "from mail-yw0-f193.google.com (mail-yw0-f193.google.com\n\t[209.85.161.193])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xHBbb2J3gzDqn9\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed, 26 Jul 2017 07:44:43 +1000 (AEST)",
            "by mail-yw0-f193.google.com with SMTP id u207so3655672ywc.0\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 25 Jul 2017 14:44:43 -0700 (PDT)",
            "from localhost.localdomain (24-223-123-72.static.usa-companies.net.\n\t[24.223.123.72]) by smtp.googlemail.com with ESMTPSA id\n\t204sm2386383ywx.35.2017.07.25.14.44.39\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 25 Jul 2017 14:44:40 -0700 (PDT)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=Y+KNQmzd4TESkuDDD54Qn98tMFXL87R0JaO/X1yWMb8=;\n\tb=LuiPgA0vpctIXXMJ7/XMC3mZU9DFY0FaOwhzNL9U9XyKI/FLsQSwDmezxm3kFL2+Hf\n\tAdvRQNbXWC9U5zhDARH6gb4s1kH9BXVZKNm0BCpYecxQEs9FD5cxoMdTubFNzFc3CkJz\n\tkNo++fadm3UUkWA5zhHEFUZLO1Xh26l/uRCO6x/RAy7F9ge7CsPLdyQkDPchpcRkuf9B\n\tJbBB0Pw8+6vpCmM7vZ1mgLkJm2CiFzXJwzfumo2ag7difU9xcFK6uC7vBNyM/AHEbSSG\n\t/vCoXqa+xQ8kQckyCLie3AmkkrIECHkQt+rcmS9ZeQddxPw+Ko8Xl5WAzmdBtPfwovbK\n\t5gXg==",
        "X-Gm-Message-State": "AIVw113sG9cTN0429irh6keRpq8U7KMKHpcF3ZcDoBex3jWdbCquJh85\n\t7crD4fq7TyWJdg==",
        "X-Received": "by 10.13.246.65 with SMTP id g62mr18611556ywf.205.1501019081425; \n\tTue, 25 Jul 2017 14:44:41 -0700 (PDT)",
        "From": "Rob Herring <robh@kernel.org>",
        "To": "devicetree@vger.kernel.org,\n\tlinuxppc-dev@lists.ozlabs.org",
        "Subject": "[PATCH 4/4] of/fdt: only store the device node basename in full_name",
        "Date": "Tue, 25 Jul 2017 16:44:27 -0500",
        "Message-Id": "<20170725214427.25768-5-robh@kernel.org>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": "<20170725214427.25768-1-robh@kernel.org>",
        "References": "<20170725214427.25768-1-robh@kernel.org>",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.23",
        "Precedence": "list",
        "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>",
        "Cc": "Frank Rowand <frowand.list@gmail.com>, linux-kernel@vger.kernel.org,\n\tPaul Mackerras <paulus@samba.org>",
        "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"
    },
    "content": "With dependencies on a statically allocated full path name converted to\nuse %pOF format specifier, we can store just the basename of node, and\nthe unflattening of the FDT can be simplified.\n\nThis commit will affect the remaining users of full_name. After\nanalyzing these users, the remaining cases should only change some print\nmessages. The main users of full_name are providing a name for struct\nresource. The resource names shouldn't be important other than providing\n/proc/iomem names.\n\nWe no longer distinguish between pre and post 0x10 dtb formats as either\na full path or basename will work. However, less than 0x10 formats have\nbeen broken since the conversion to use libfdt (and no one has cared).\nThe conversion of the unflattening code to be non-recursive also broke\npre 0x10 formats as the populate_node function would return 0 in that\ncase.\n\nSigned-off-by: Rob Herring <robh@kernel.org>\n---\n drivers/of/fdt.c | 69 +++++++++-----------------------------------------------\n 1 file changed, 11 insertions(+), 58 deletions(-)",
    "diff": "diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c\nindex ce30c9a588a4..27c535af0be8 100644\n--- a/drivers/of/fdt.c\n+++ b/drivers/of/fdt.c\n@@ -266,74 +266,32 @@ static void populate_properties(const void *blob,\n \t\t*pprev = NULL;\n }\n \n-static unsigned int populate_node(const void *blob,\n-\t\t\t\t  int offset,\n-\t\t\t\t  void **mem,\n-\t\t\t\t  struct device_node *dad,\n-\t\t\t\t  unsigned int fpsize,\n-\t\t\t\t  struct device_node **pnp,\n-\t\t\t\t  bool dryrun)\n+static bool populate_node(const void *blob,\n+\t\t\t  int offset,\n+\t\t\t  void **mem,\n+\t\t\t  struct device_node *dad,\n+\t\t\t  struct device_node **pnp,\n+\t\t\t  bool dryrun)\n {\n \tstruct device_node *np;\n \tconst char *pathp;\n \tunsigned int l, allocl;\n-\tint new_format = 0;\n \n \tpathp = fdt_get_name(blob, offset, &l);\n \tif (!pathp) {\n \t\t*pnp = NULL;\n-\t\treturn 0;\n+\t\treturn false;\n \t}\n \n \tallocl = ++l;\n \n-\t/* version 0x10 has a more compact unit name here instead of the full\n-\t * path. we accumulate the full path size using \"fpsize\", we'll rebuild\n-\t * it later. We detect this because the first character of the name is\n-\t * not '/'.\n-\t */\n-\tif ((*pathp) != '/') {\n-\t\tnew_format = 1;\n-\t\tif (fpsize == 0) {\n-\t\t\t/* root node: special case. fpsize accounts for path\n-\t\t\t * plus terminating zero. root node only has '/', so\n-\t\t\t * fpsize should be 2, but we want to avoid the first\n-\t\t\t * level nodes to have two '/' so we use fpsize 1 here\n-\t\t\t */\n-\t\t\tfpsize = 1;\n-\t\t\tallocl = 2;\n-\t\t\tl = 1;\n-\t\t\tpathp = \"\";\n-\t\t} else {\n-\t\t\t/* account for '/' and path size minus terminal 0\n-\t\t\t * already in 'l'\n-\t\t\t */\n-\t\t\tfpsize += l;\n-\t\t\tallocl = fpsize;\n-\t\t}\n-\t}\n-\n \tnp = unflatten_dt_alloc(mem, sizeof(struct device_node) + allocl,\n \t\t\t\t__alignof__(struct device_node));\n \tif (!dryrun) {\n \t\tchar *fn;\n \t\tof_node_init(np);\n \t\tnp->full_name = fn = ((char *)np) + sizeof(*np);\n-\t\tif (new_format) {\n-\t\t\t/* rebuild full path for new format */\n-\t\t\tif (dad && dad->parent) {\n-\t\t\t\tstrcpy(fn, dad->full_name);\n-#ifdef DEBUG\n-\t\t\t\tif ((strlen(fn) + l + 1) != allocl) {\n-\t\t\t\t\tpr_debug(\"%s: p: %d, l: %d, a: %d\\n\",\n-\t\t\t\t\t\tpathp, (int)strlen(fn),\n-\t\t\t\t\t\tl, allocl);\n-\t\t\t\t}\n-#endif\n-\t\t\t\tfn += strlen(fn);\n-\t\t\t}\n-\t\t\t*(fn++) = '/';\n-\t\t}\n+\n \t\tmemcpy(fn, pathp, l);\n \n \t\tif (dad != NULL) {\n@@ -355,7 +313,7 @@ static unsigned int populate_node(const void *blob,\n \t}\n \n \t*pnp = np;\n-\treturn fpsize;\n+\treturn true;\n }\n \n static void reverse_nodes(struct device_node *parent)\n@@ -399,7 +357,6 @@ static int unflatten_dt_nodes(const void *blob,\n \tstruct device_node *root;\n \tint offset = 0, depth = 0, initial_depth = 0;\n #define FDT_MAX_DEPTH\t64\n-\tunsigned int fpsizes[FDT_MAX_DEPTH];\n \tstruct device_node *nps[FDT_MAX_DEPTH];\n \tvoid *base = mem;\n \tbool dryrun = !base;\n@@ -418,7 +375,6 @@ static int unflatten_dt_nodes(const void *blob,\n \t\tdepth = initial_depth = 1;\n \n \troot = dad;\n-\tfpsizes[depth] = dad ? strlen(of_node_full_name(dad)) : 0;\n \tnps[depth] = dad;\n \n \tfor (offset = 0;\n@@ -427,11 +383,8 @@ static int unflatten_dt_nodes(const void *blob,\n \t\tif (WARN_ON_ONCE(depth >= FDT_MAX_DEPTH))\n \t\t\tcontinue;\n \n-\t\tfpsizes[depth+1] = populate_node(blob, offset, &mem,\n-\t\t\t\t\t\t nps[depth],\n-\t\t\t\t\t\t fpsizes[depth],\n-\t\t\t\t\t\t &nps[depth+1], dryrun);\n-\t\tif (!fpsizes[depth+1])\n+\t\tif (!populate_node(blob, offset, &mem, nps[depth],\n+\t\t\t\t   &nps[depth+1], dryrun))\n \t\t\treturn mem - base;\n \n \t\tif (!dryrun && nodepp && !*nodepp)\n",
    "prefixes": [
        "4/4"
    ]
}