From patchwork Sun Mar 6 03:19:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1601652 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Uwyk2A73; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KB6NJ5GyDz9sGP for ; Sun, 6 Mar 2022 14:22:40 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1D08583D0B; Sun, 6 Mar 2022 04:20:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Uwyk2A73"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 68A2B83D0F; Sun, 6 Mar 2022 04:20:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 41C6883D0F for ; Sun, 6 Mar 2022 04:19:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12f.google.com with SMTP id b5so6642998ilj.9 for ; Sat, 05 Mar 2022 19:19:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hMwiLvFBgYV1dYJtUL5ZycbEji8WTMdP4r6a4YJe+/A=; b=Uwyk2A73iRoFz1BrucxDW9/am8Cjv4U+bcWrlVHHgqGgsaqAV+EB7nXQYqumltTk6X LZNFsHuDCrp0oeTnvYXkQPa7mXwzzTVKeItGB5kOTgvRFfyF93MzZeZeWiqeH1YkhD1O P3fvMlePMSLajG4D0vnDerFbkiNfJ9sR9KpU0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hMwiLvFBgYV1dYJtUL5ZycbEji8WTMdP4r6a4YJe+/A=; b=WVEVfymTJUggLHJ8CNPBykpgA6VLAPJABKbIf2Pk1Olu0W3Qisvt3VFRyUUSw3xdTl PJ5CI5JRct/c0HRd87Am60RZQeBCUyZ56wPIUmoekssWb7C4MwX4tfvOboCZVvsfOrUz tlfjXWU87gopShLg2QPHyRTJ/3oIUk64iAUAWmWQ+SNWguHRHAgYlonG29nBFg1cMQCk DDQqZHtwj0nl2CMoZV5btjI2ECryMKnGLFhw1oIflxA1XSWfwIkyu5cd8R8c1kYaEtFL UFyFNtD9loG9gLvBnSgqP/PhHQiMT6bvlUf2jJ6D/7pzlobQmE0aJMmX0iPkUxVSGjBi dfNA== X-Gm-Message-State: AOAM533nLYCFm0fZ/VHk0vE7Hb6bC6I9p6Q6ajd9tSMc0Zo8jFJWHa8G PzP1I/n8e/NNYr0Cp1DyVKElhrjinavigQ== X-Google-Smtp-Source: ABdhPJyBFX9T633XOHcAXueo6gLZL/TYBMjNLDvSMYaU5Tjpf1amGyk+O65/o/Kn4y3VwHXWUd8U4g== X-Received: by 2002:a05:6e02:170d:b0:2c2:7474:eac5 with SMTP id u13-20020a056e02170d00b002c27474eac5mr5704202ill.220.1646536784484; Sat, 05 Mar 2022 19:19:44 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id t14-20020a056e02160e00b002c60907ec07sm8403358ilu.62.2022.03.05.19.19.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Mar 2022 19:19:44 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Roger Quadros , Alper Nebi Yasak , Philippe Reynes , Ivan Mikhaylov , Peter Geis , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich , Tom Rini Subject: [PATCH v3 19/26] binman: Update fit to use node instead of subnode Date: Sat, 5 Mar 2022 20:19:10 -0700 Message-Id: <20220306031917.3005215-20-sjg@chromium.org> X-Mailer: git-send-email 2.35.1.616.g0bdcbb4464-goog In-Reply-To: <20220306031917.3005215-1-sjg@chromium.org> References: <20220306031917.3005215-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean It doesn't make sense to use 'subnode' as a function parameter since it is just a 'node' so far as the function is concerned. Update two functions to use 'node' instead. Signed-off-by: Simon Glass Reviewed-by: Alper Nebi Yasak --- (no changes since v1) tools/binman/etype/fit.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py index 169b55887c..d2e3b4dea8 100644 --- a/tools/binman/etype/fit.py +++ b/tools/binman/etype/fit.py @@ -328,7 +328,7 @@ class Entry_fit(Entry_section): return fsw.property(pname, prop.bytes) - def _gen_fdt_nodes(subnode, depth, in_images): + def _gen_fdt_nodes(node, depth, in_images): """Generate FDT nodes This creates one node for each member of self._fdts using the @@ -338,7 +338,7 @@ class Entry_fit(Entry_section): first. Args: - subnode (None): Generator node to process + node (None): Generator node to process depth: Current node depth (0 is the base 'fit' node) in_images: True if this is inside the 'images' node, so that 'data' properties should be generated @@ -346,10 +346,10 @@ class Entry_fit(Entry_section): if self._fdts: # Generate nodes for each FDT for seq, fdt_fname in enumerate(self._fdts): - node_name = subnode.name[1:].replace('SEQ', str(seq + 1)) + node_name = node.name[1:].replace('SEQ', str(seq + 1)) fname = tools.get_input_filename(fdt_fname + '.dtb') with fsw.add_node(node_name): - for pname, prop in subnode.props.items(): + for pname, prop in node.props.items(): val = prop.bytes.replace( b'NAME', tools.to_bytes(fdt_fname)) val = val.replace( @@ -367,7 +367,7 @@ class Entry_fit(Entry_section): else: self.Raise("Generator node requires 'fit,fdt-list' property") - def _gen_node(base_node, subnode, depth, in_images): + def _gen_node(base_node, node, depth, in_images): """Generate nodes from a template This creates one node for each member of self._fdts using the @@ -379,14 +379,14 @@ class Entry_fit(Entry_section): Args: base_node (Node): Base Node of the FIT (with 'description' property) - subnode (Node): Generator node to process + node (Node): Generator node to process depth (int): Current node depth (0 is the base 'fit' node) in_images (bool): True if this is inside the 'images' node, so that 'data' properties should be generated """ - oper = self._get_operation(base_node, subnode) + oper = self._get_operation(base_node, node) if oper == OP_GEN_FDT_NODES: - _gen_fdt_nodes(subnode, depth, in_images) + _gen_fdt_nodes(node, depth, in_images) def _add_node(base_node, depth, node): """Add nodes to the output FIT