Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/809824/?format=api
{ "id": 809824, "url": "http://patchwork.ozlabs.org/api/patches/809824/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1504555943-12893-2-git-send-email-pantelis.antoniou@konsulko.com/", "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": "<1504555943-12893-2-git-send-email-pantelis.antoniou@konsulko.com>", "list_archive_url": null, "date": "2017-09-04T20:12:10", "name": "[U-Boot,v3,01/14] Introduce fdt_setprop_placeholder() method", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "0790ffa17aec2c0465e8a17fbac08362dfc3be5b", "submitter": { "id": 64098, "url": "http://patchwork.ozlabs.org/api/people/64098/?format=api", "name": "Pantelis Antoniou", "email": "pantelis.antoniou@konsulko.com" }, "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/1504555943-12893-2-git-send-email-pantelis.antoniou@konsulko.com/mbox/", "series": [ { "id": 1453, "url": "http://patchwork.ozlabs.org/api/series/1453/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=1453", "date": "2017-09-04T20:12:09", "name": "uboot overlays, FIT image & unittest", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/1453/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/809824/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/809824/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\" (1024-bit key;\n\tunprotected) header.d=konsulko.com header.i=@konsulko.com\n\theader.b=\"Uy4+uqu+\"; dkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xmLfR3KjKz9t2R\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 5 Sep 2017 06:14:23 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 08474C21F12; Mon, 4 Sep 2017 20:13:15 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 4B1E5C21F2F;\n\tMon, 4 Sep 2017 20:13:00 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid D172AC21F02; Mon, 4 Sep 2017 20:12:55 +0000 (UTC)", "from mail-wm0-f48.google.com (mail-wm0-f48.google.com\n\t[74.125.82.48])\n\tby lists.denx.de (Postfix) with ESMTPS id 307AAC21C2F\n\tfor <u-boot@lists.denx.de>; Mon, 4 Sep 2017 20:12:54 +0000 (UTC)", "by mail-wm0-f48.google.com with SMTP id f145so6735094wme.0\n\tfor <u-boot@lists.denx.de>; Mon, 04 Sep 2017 13:12:54 -0700 (PDT)", "from localhost.localdomain ([195.97.110.117])\n\tby smtp.gmail.com with ESMTPSA id\n\tu8sm3720435wrc.92.2017.09.04.13.12.51\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 04 Sep 2017 13:12:53 -0700 (PDT)" ], "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=konsulko.com;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=zkVmHlvGrK4jP3lqjdj93xMas1MSP0Ebeyk1NLM8jOc=;\n\tb=Uy4+uqu+RyOAmUng1iQeGcNNEtvp6zUNAYgPXDvBmrBhO5jkd9U+gfJEFrUT8OMi8u\n\td4/8eYMQgbUNTWUeEYiwGf5yyf2tDndKP1L3w438A+Kyz4RwGSRlWzl52w4Hog9aGC5A\n\tEcySdKwDWFYazOeIECNDaIbJ6SR4dN4n89fYs=", "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=zkVmHlvGrK4jP3lqjdj93xMas1MSP0Ebeyk1NLM8jOc=;\n\tb=ej+BV/ZuZYhVyaPqMMjZAUcHcUxfRBJlv1U3XT2iTii1iN6VtxSsG/TktIDe3Vor46\n\tN8L8puQqiiKpbIcPMMNWq/fW0n54Jg2t8h32HMOd4TTSTYmjBSZE3FFU45QBuGs8BdZ6\n\tKplrpHpmu+3CIgd4y8qwDPJUMPDw8FRJgdNaqOYw8OuEVIOe9faxe49n/y8Ta/KarVYp\n\tUdDa4zBp4lgBZ86tf7wycFIpeWaT2QX+4leHXVu2XXTSBGjAMZPssV+ACLUFPF6WULuw\n\tUHGRd7A+kNm2wK+pfFhRcDJERU5IvK8aDENGM6M9LaH8wIdz4K0JL1cbd5tWw4iWuYqV\n\tCfeQ==", "X-Gm-Message-State": "AHPjjUjBPW0r1F/2PADVzpVq9Y6WD68vcW/7iR/0mWvbIbQv4cFlDMah\n\tXPm/5zXjW+Kr1B7+", "X-Google-Smtp-Source": "ADKCNb7pVEAmgAlCYi25I9guWMZlJtr48hcpGsWwQMEP8xwNedzTETfd12VEXvtE6tiSNqjc41xRpg==", "X-Received": "by 10.28.69.15 with SMTP id s15mr815452wma.118.1504555973840;\n\tMon, 04 Sep 2017 13:12:53 -0700 (PDT)", "From": "Pantelis Antoniou <pantelis.antoniou@konsulko.com>", "To": "Tom Rini <trini@konsulko.com>", "Date": "Mon, 4 Sep 2017 23:12:10 +0300", "Message-Id": "<1504555943-12893-2-git-send-email-pantelis.antoniou@konsulko.com>", "X-Mailer": "git-send-email 2.1.4", "In-Reply-To": "<1504555943-12893-1-git-send-email-pantelis.antoniou@konsulko.com>", "References": "<1504555943-12893-1-git-send-email-pantelis.antoniou@konsulko.com>", "Cc": "Marek Vasut <marex@denx.de>,\n\tPantelis Antoniou <pantelis.antoniou@konsulko.com>,\n\tTero Kristo <t-kristo@ti.com>, u-boot@lists.denx.de,\n\tMaxime Ripard <maxime.ripard@free-electrons.com>,\n\tStefan Roese <sr@denx.de>, Alan Ott <alan@signal11.us>,\n\tDavid Gibson <david@gibson.dropbear.id.au>", "Subject": "[U-Boot] [PATCH v3 01/14] Introduce fdt_setprop_placeholder() method", "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": "In some cases you need to add a property but the contents of it\nare not known at creation time, merely the extend of it.\n\nThis method allows you to create a property of a given size (filled\nwith garbage) while a pointer to the property data will be provided.\n\nSigned-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>\n[dwg: Corrected commit message]\nSigned-off-by: David Gibson <david@gibson.dropbear.id.au>\n---\n lib/libfdt/fdt_rw.c | 20 +++++++++++++++++---\n lib/libfdt/libfdt.h | 31 +++++++++++++++++++++++++++++++\n 2 files changed, 48 insertions(+), 3 deletions(-)", "diff": "diff --git a/lib/libfdt/fdt_rw.c b/lib/libfdt/fdt_rw.c\nindex 80a3212..3dc7752 100644\n--- a/lib/libfdt/fdt_rw.c\n+++ b/lib/libfdt/fdt_rw.c\n@@ -228,8 +228,8 @@ int fdt_set_name(void *fdt, int nodeoffset, const char *name)\n \treturn 0;\n }\n \n-int fdt_setprop(void *fdt, int nodeoffset, const char *name,\n-\t\tconst void *val, int len)\n+int fdt_setprop_placeholder(void *fdt, int nodeoffset, const char *name,\n+\t\t\t int len, void **prop_data)\n {\n \tstruct fdt_property *prop;\n \tint err;\n@@ -242,8 +242,22 @@ int fdt_setprop(void *fdt, int nodeoffset, const char *name,\n \tif (err)\n \t\treturn err;\n \n+\t*prop_data = prop->data;\n+\treturn 0;\n+}\n+\n+int fdt_setprop(void *fdt, int nodeoffset, const char *name,\n+\t\tconst void *val, int len)\n+{\n+\tvoid *prop_data;\n+\tint err;\n+\n+\terr = fdt_setprop_placeholder(fdt, nodeoffset, name, len, &prop_data);\n+\tif (err)\n+\t\treturn err;\n+\n \tif (len)\n-\t\tmemcpy(prop->data, val, len);\n+\t\tmemcpy(prop_data, val, len);\n \treturn 0;\n }\n \ndiff --git a/lib/libfdt/libfdt.h b/lib/libfdt/libfdt.h\nindex f3f9cad..6af94cb 100644\n--- a/lib/libfdt/libfdt.h\n+++ b/lib/libfdt/libfdt.h\n@@ -1405,6 +1405,37 @@ int fdt_setprop(void *fdt, int nodeoffset, const char *name,\n \t\tconst void *val, int len);\n \n /**\n+ * fdt_setprop _placeholder - allocate space for a property\n+ * @fdt: pointer to the device tree blob\n+ * @nodeoffset: offset of the node whose property to change\n+ * @name: name of the property to change\n+ * @len: length of the property value\n+ * @prop_data: return pointer to property data\n+ *\n+ * fdt_setprop_placeholer() allocates the named property in the given node.\n+ * If the property exists it is resized. In either case a pointer to the\n+ * property data is returned.\n+ *\n+ * This function may insert or delete data from the blob, and will\n+ * therefore change the offsets of some existing nodes.\n+ *\n+ * returns:\n+ *\t0, on success\n+ *\t-FDT_ERR_NOSPACE, there is insufficient free space in the blob to\n+ *\t\tcontain the new property value\n+ *\t-FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag\n+ *\t-FDT_ERR_BADLAYOUT,\n+ *\t-FDT_ERR_BADMAGIC,\n+ *\t-FDT_ERR_BADVERSION,\n+ *\t-FDT_ERR_BADSTATE,\n+ *\t-FDT_ERR_BADSTRUCTURE,\n+ *\t-FDT_ERR_BADLAYOUT,\n+ *\t-FDT_ERR_TRUNCATED, standard meanings\n+ */\n+int fdt_setprop_placeholder(void *fdt, int nodeoffset, const char *name,\n+\t\t\t int len, void **prop_data);\n+\n+/**\n * fdt_setprop_u32 - set a property to a 32-bit integer\n * @fdt: pointer to the device tree blob\n * @nodeoffset: offset of the node whose property to change\n", "prefixes": [ "U-Boot", "v3", "01/14" ] }