From patchwork Mon Dec 4 02:05:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 844058 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yqpHb4kkXz9s7B for ; Mon, 4 Dec 2017 13:10:19 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 57B00C22047; Mon, 4 Dec 2017 02:08:53 +0000 (UTC) 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=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 37352C22063; Mon, 4 Dec 2017 02:06:12 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4D9DAC22040; Mon, 4 Dec 2017 02:06:01 +0000 (UTC) Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by lists.denx.de (Postfix) with ESMTP id C02A6C2204D for ; Mon, 4 Dec 2017 02:05:56 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2BBDC15AD; Sun, 3 Dec 2017 18:05:56 -0800 (PST) Received: from slackpad.lan (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E088D3F236; Sun, 3 Dec 2017 18:05:54 -0800 (PST) From: Andre Przywara To: Simon Glass , Tom Rini Date: Mon, 4 Dec 2017 02:05:10 +0000 Message-Id: <20171204020513.18708-5-andre.przywara@arm.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171204020513.18708-1-andre.przywara@arm.com> References: <20171204020513.18708-1-andre.przywara@arm.com> Cc: Pantelis Antoniou , u-boot@lists.denx.de Subject: [U-Boot] [PATCH 4/7] fix incorrect usage of DT node unit address in comments X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case. Fix all occurences in the tree where node names were mentioned in comments, to not give bad examples to the reader. Signed-off-by: Andre Przywara Reviewed-by: Simon Glass Reviewed-by: Simon Glass --- common/image-fit.c | 16 ++++++++-------- common/image-sig.c | 2 +- include/image.h | 26 +++++++++++++------------- tools/image-host.c | 10 +++++----- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index 7f17fd1410..990c6038d7 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -330,7 +330,7 @@ static void fit_image_print_verification_data(const void *fit, int noffset, /* * Check subnode name, must be equal to "hash" or "signature". * Multiple hash/signature nodes require unique unit node - * names, e.g. hash@1, hash@2, signature@1, signature@2, etc. + * names, e.g. hash-1, hash-2, signature-1, signature-2, etc. */ name = fit_get_name(fit, noffset, NULL); if (!strncmp(name, FIT_HASH_NODENAME, strlen(FIT_HASH_NODENAME))) { @@ -1086,7 +1086,7 @@ int fit_image_verify(const void *fit, int image_noffset) /* * Check subnode name, must be equal to "hash". * Multiple hash nodes require unique unit node - * names, e.g. hash@1, hash@2, etc. + * names, e.g. hash-1, hash-2, etc. */ if (!strncmp(name, FIT_HASH_NODENAME, strlen(FIT_HASH_NODENAME))) { @@ -1323,15 +1323,15 @@ int fit_check_format(const void *fit) * * / o image-tree * |-o images - * | |-o fdt@1 - * | |-o fdt@2 + * | |-o fdt-1 + * | |-o fdt-2 * | * |-o configurations - * |-o config@1 - * | |-fdt = fdt@1 + * |-o config-1 + * | |-fdt = fdt-1 * | - * |-o config@2 - * |-fdt = fdt@2 + * |-o config-2 + * |-fdt = fdt-2 * * / o U-Boot fdt * |-compatible = "foo,bar", "bim,bam" diff --git a/common/image-sig.c b/common/image-sig.c index bf824fef3c..d9f712fc1e 100644 --- a/common/image-sig.c +++ b/common/image-sig.c @@ -347,7 +347,7 @@ int fit_config_check_sig(const void *fit, int noffset, int required_keynode, /* * Each node can generate one region for each sub-node. Allow for - * 7 sub-nodes (hash@1, signature@1, etc.) and some extra. + * 7 sub-nodes (hash-1, signature-1, etc.) and some extra. */ max_regions = 20 + count * 7; struct fdt_region fdt_regions[max_regions]; diff --git a/include/image.h b/include/image.h index e9c18ce403..e28415bd9a 100644 --- a/include/image.h +++ b/include/image.h @@ -577,7 +577,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, * boot_get_loadable() will take the given FIT configuration, and look * for a field named "loadables". Loadables, is a list of elements in * the FIT given as strings. exe: - * loadables = "linux_kernel@1", "fdt@2"; + * loadables = "linux_kernel", "fdt-2"; * this function will attempt to parse each string, and load the * corresponding element from the FIT into memory. Once placed, * no aditional actions are taken. @@ -603,10 +603,10 @@ int boot_get_setup_fit(bootm_headers_t *images, uint8_t arch, * @param images Boot images structure * @param addr Address of FIT in memory * @param fit_unamep On entry this is the requested image name - * (e.g. "kernel@1") or NULL to use the default. On exit + * (e.g. "kernel") or NULL to use the default. On exit * points to the selected image name * @param fit_uname_configp On entry this is the requested configuration - * name (e.g. "conf@1") or NULL to use the default. On + * name (e.g. "conf-1") or NULL to use the default. On * exit points to the selected configuration name. * @param arch Expected architecture (IH_ARCH_...) * @param datap Returns address of loaded image @@ -631,10 +631,10 @@ int boot_get_fdt_fit(bootm_headers_t *images, ulong addr, * @param images Boot images structure * @param addr Address of FIT in memory * @param fit_unamep On entry this is the requested image name - * (e.g. "kernel@1") or NULL to use the default. On exit + * (e.g. "kernel") or NULL to use the default. On exit * points to the selected image name * @param fit_uname_configp On entry this is the requested configuration - * name (e.g. "conf@1") or NULL to use the default. On + * name (e.g. "conf-1") or NULL to use the default. On * exit points to the selected configuration name. * @param arch Expected architecture (IH_ARCH_...) * @param image_type Required image type (IH_TYPE_...). If this is @@ -657,25 +657,25 @@ int fit_image_load(bootm_headers_t *images, ulong addr, /** * fit_get_node_from_config() - Look up an image a FIT by type * - * This looks in the selected conf@ node (images->fit_uname_cfg) for a + * This looks in the selected conf- node (images->fit_uname_cfg) for a * particular image type (e.g. "kernel") and then finds the image that is * referred to. * * For example, for something like: * * images { - * kernel@1 { + * kernel { * ... * }; * }; * configurations { - * conf@1 { - * kernel = "kernel@1"; + * conf-1 { + * kernel = "kernel"; * }; * }; * * the function will return the node offset of the kernel@1 node, assuming - * that conf@1 is the chosen configuration. + * that conf-1 is the chosen configuration. * * @param images Boot images structure * @param prop_name Property name to look up (FIT_..._PROP) @@ -1018,10 +1018,10 @@ int fit_conf_get_node(const void *fit, const char *conf_uname); * @noffset: Offset of conf@xxx node to check * @prop_name: Property to read from the conf node * - * The conf@ nodes contain references to other nodes, using properties - * like 'kernel = "kernel@1"'. Given such a property name (e.g. "kernel"), + * The conf- nodes contain references to other nodes, using properties + * like 'kernel = "kernel"'. Given such a property name (e.g. "kernel"), * return the offset of the node referred to (e.g. offset of node - * "/images/kernel@1". + * "/images/kernel". */ int fit_conf_get_prop_node(const void *fit, int noffset, const char *prop_name); diff --git a/tools/image-host.c b/tools/image-host.c index 2c0030b5e2..8a7469e538 100644 --- a/tools/image-host.c +++ b/tools/image-host.c @@ -270,16 +270,16 @@ static int fit_image_process_sig(const char *keydir, void *keydest, * * Input component image node structure: * - * o image@1 (at image_noffset) + * o image-1 (at image_noffset) * | - data = [binary data] - * o hash@1 + * o hash-1 * |- algo = "sha1" * * Output component image node structure: * - * o image@1 (at image_noffset) + * o image-1 (at image_noffset) * | - data = [binary data] - * o hash@1 + * o hash-1 * |- algo = "sha1" * |- value = sha1(data) * @@ -321,7 +321,7 @@ int fit_image_add_verification_data(const char *keydir, void *keydest, /* * Check subnode name, must be equal to "hash" or "signature". * Multiple hash nodes require unique unit node - * names, e.g. hash@1, hash@2, signature@1, etc. + * names, e.g. hash-1, hash-2, signature-1, etc. */ node_name = fit_get_name(fit, noffset, NULL); if (!strncmp(node_name, FIT_HASH_NODENAME,