Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807280/?format=api
{ "id": 807280, "url": "http://patchwork.ozlabs.org/api/patches/807280/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170829201601.64312-10-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-10-sjg@chromium.org>", "list_archive_url": null, "date": "2017-08-29T20:15:54", "name": "[U-Boot,v2,09/16] dtoc: Make is_phandle() a member function", "commit_ref": "2925c26bb2b5450349c2080cac764c18e15a052e", "pull_url": null, "state": "accepted", "archived": false, "hash": "609398256361b24af73a828ddb544db395b17ee0", "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-10-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/807280/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807280/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=\"mBwvdH4c\"; dkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xhg8w11Rsz9sQl\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 06:24:32 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid D75C8C222A0; Tue, 29 Aug 2017 20:20:38 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 1DD32C22653;\n\tTue, 29 Aug 2017 20:17:18 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid C2EB9C222E9; Tue, 29 Aug 2017 20:16:23 +0000 (UTC)", "from mail-oi0-f49.google.com (mail-oi0-f49.google.com\n\t[209.85.218.49])\n\tby lists.denx.de (Postfix) with ESMTPS id 88A98C22104\n\tfor <u-boot@lists.denx.de>; Tue, 29 Aug 2017 20:16:19 +0000 (UTC)", "by mail-oi0-f49.google.com with SMTP id k77so36401461oib.2\n\tfor <u-boot@lists.denx.de>; Tue, 29 Aug 2017 13:16:19 -0700 (PDT)", "from kiwi.bld.corp.google.com ([100.101.164.89])\n\tby smtp.gmail.com with ESMTPSA id\n\to7sm3249013oia.44.2017.08.29.13.16.16\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 29 Aug 2017 13:16:17 -0700 (PDT)", "by kiwi.bld.corp.google.com (Postfix, from userid 121222)\n\tid 16CE313FCAB; Tue, 29 Aug 2017 14:16:16 -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=93nQjTmqXBvOvuS8bMJRb9U1TSheLGB/k4oqTXNgzbY=;\n\tb=mBwvdH4cY0EFW9YZLX14h4Kk7F7wU4lgeK49uQ4P1ZqQBjbaPXtEpoIQhRjJlZySBR\n\txfMLl95szWQSpG1qjxA5Crx4RXkO03Xls9tyk9KBGKda9YZjaAGFDz6M3fzLB3F1Gt3R\n\tO8RNkGV6LkRfh/mt2nqFikpjwYTtc9Kdop9UjYn5/CDQfaudaPRWok8cdhDpyzWPJc7t\n\tM8P/BowQeugcU5+hTtdONJzWME+ni655GH0GtpzbRwBihkia0wXTfyK4/x7tti6XuySr\n\t6CwsyVsM9ZVZjN0Ep8NHz2FfkxVOVOktutxIeLIAVS0AhLUW8IpjPoXpYWRWg6B4nCDE\n\tfZhQ==", "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=93nQjTmqXBvOvuS8bMJRb9U1TSheLGB/k4oqTXNgzbY=;\n\tb=jG6gyXnQrrL42eKMZ8LmTy6PKzuGYjwqDxKkzqt9Nufl/WuwGxgnqx5jRWtUdZcurH\n\tmj+rU5aot6P/GhD9aTXwHj/GY9Wm4Yagcu48NQPeOkp03OoxI2sTIlfHGrPq47xAfPiC\n\twBKPVnvDYg3MwH5iMDMbYPmJXJbIBRlwYAEjLvADi4IPqlw81OuKbiqyefklXiUmF3WU\n\tb74WMeXY2s1PGO/TLuDCqUBWs9ofI1VtWY4/+xOzu4yAeh1ecnDCL3sa9blmDZ3m0K9u\n\tFWfgS5MhF3novq84ghqbt6YPwNiiJc3qby200hYK5/J65ZcGjKIMdQn80FKAEWKz4osa\n\tT9fg==", "X-Gm-Message-State": "AHYfb5hFsbD4acmo9AR6QFmyJANSb39wA8E0H/isqLaqvJJcaE7p3UUL\n\t8KeiwFH0S7iWiSLPagJn1w==", "X-Google-Smtp-Source": "ADKCNb5VmUabEhvO9sMh+I9Y9zyHK0Z/ImVfKwcy0iHrGGDsH25/jPhO6ZgUalo7L/Q0tFMApsPxcw==", "X-Received": "by 10.202.173.21 with SMTP id w21mr1394026oie.106.1504037777984; \n\tTue, 29 Aug 2017 13:16:17 -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:54 -0600", "Message-Id": "<20170829201601.64312-10-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 09/16] dtoc: Make is_phandle() a member function", "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": "This function will need to have access to class members once we enhance it\nto support multiple phandle values. In preparation for that, move it into\nthe class.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\nChanges in v2: None\n\n tools/dtoc/dtb_platdata.py | 36 ++++++++++++++++++------------------\n 1 file changed, 18 insertions(+), 18 deletions(-)", "diff": "diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py\nindex 705ab27c86..a483d6c875 100644\n--- a/tools/dtoc/dtb_platdata.py\n+++ b/tools/dtoc/dtb_platdata.py\n@@ -116,21 +116,6 @@ def get_compat_name(node):\n compat, aliases = compat[0], compat[1:]\n return conv_name_to_c(compat), [conv_name_to_c(a) for a in aliases]\n \n-def is_phandle(prop):\n- \"\"\"Check if a node contains phandles\n-\n- We have no reliable way of detecting whether a node uses a phandle\n- or not. As an interim measure, use a list of known property names.\n-\n- Args:\n- prop: Prop object to check\n- Return:\n- True if the object value contains phandles, else False\n- \"\"\"\n- if prop.name in ['clocks']:\n- return True\n- return False\n-\n \n class DtbPlatdata(object):\n \"\"\"Provide a means to convert device tree binary data to platform data\n@@ -196,6 +181,21 @@ class DtbPlatdata(object):\n self._lines = []\n return lines\n \n+ def is_phandle(self, prop):\n+\t\"\"\"Check if a node contains phandles\n+\n+\tWe have no reliable way of detecting whether a node uses a phandle\n+\tor not. As an interim measure, use a list of known property names.\n+\n+\tArgs:\n+\t prop: Prop object to check\n+\tReturn:\n+\t True if the object value contains phandles, else False\n+\t\"\"\"\n+\tif prop.name in ['clocks']:\n+\t return True\n+\treturn False\n+\n def scan_dtb(self):\n \"\"\"Scan the device tree to obtain a tree of nodes and properties\n \n@@ -359,7 +359,7 @@ class DtbPlatdata(object):\n if pname in PROP_IGNORE_LIST or pname[0] == '#':\n continue\n if isinstance(prop.value, list):\n- if is_phandle(prop):\n+ if self.is_phandle(prop):\n # Process the list as pairs of (phandle, id)\n value_it = iter(prop.value)\n for phandle_cell, _ in zip(value_it, value_it):\n@@ -383,7 +383,7 @@ class DtbPlatdata(object):\n self.out('struct %s%s {\\n' % (STRUCT_PREFIX, name))\n for pname in sorted(structs[name]):\n prop = structs[name][pname]\n- if is_phandle(prop):\n+ if self.is_phandle(prop):\n # For phandles, include a reference to the target\n self.out('\\t%s%s[%d]' % (tab_to(2, 'struct phandle_2_cell'),\n conv_name_to_c(prop.name),\n@@ -423,7 +423,7 @@ class DtbPlatdata(object):\n vals = []\n # For phandles, output a reference to the platform data\n # of the target node.\n- if is_phandle(prop):\n+ if self.is_phandle(prop):\n # Process the list as pairs of (phandle, id)\n value_it = iter(prop.value)\n for phandle_cell, id_cell in zip(value_it, value_it):\n", "prefixes": [ "U-Boot", "v2", "09/16" ] }