Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 81F14EB64DC for ; Tue, 11 Jul 2023 15:00:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A92BD868A6; Tue, 11 Jul 2023 16:59:57 +0200 (CEST) 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="a8qgX8rz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EE5A3868A7; Tue, 11 Jul 2023 16:59:52 +0200 (CEST) Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (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 12F1886890 for ; Tue, 11 Jul 2023 16:59:49 +0200 (CEST) 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-x12c.google.com with SMTP id e9e14a558f8ab-3457a3ada84so29429065ab.1 for ; Tue, 11 Jul 2023 07:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689087587; x=1691679587; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jR/+PTlwL5P+kZcdg2N0/5ptV5yDU4T2tkeLzrwagjs=; b=a8qgX8rzrZuCssmtIg/qtwi2qDAPYn1HKfPkk7sUa/0mW5xW0mhqQkaxJGnk03gc4U nKRnwe2yYivqWHGIxpA6l8zRxWhFAVJIfbry2XWkS/qC61/yzkwQwjNdCTk4aUUl84t6 RR82O4ZE4wHoMU26FEL38eFQK1STUM8wObBKI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689087587; x=1691679587; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jR/+PTlwL5P+kZcdg2N0/5ptV5yDU4T2tkeLzrwagjs=; b=b+NO9GNsRjwtL/+XYfV0aw1hYusOmck57WFbHNXv1S3Di5lJPBP4dAisro/C0zXlLj M+16DoaKvJfpZ1GBUGkU4e458KnvJCvyS1DUrVOv6e+WApLuRAzC2efE0zToAFOkUnOQ 81pS/0AW2ywzYPQ21GRayZUBq8gIx2CVkcHrqp2kzVlReHDnS1Mxb+3ENbPPcJQWdrSF F4XS0gx8/NZOAVfqD4BYmduZaxOmVeXToYNv+jk5e1PZAMf/qhoT2DitHl9D9L7mAcZc u6uQUNY7AF8B4T1AqAZg/9e4RbfnEBckw/VJDUSxoXC5F4ByEM7V5S9vEzVpGjlck7GR ZyGw== X-Gm-Message-State: ABy/qLY4cfkRq/t7dzttgdntiZZsm2zCPGs59AQkejqOgF/NJsvJyvU8 lCx6uAafwvDpBupk9sJYwgmYF5P3UREXT+LIP2s= X-Google-Smtp-Source: APBJJlF8hQNaoHGwAnjos478nrBwyhmKHaTKq8GtbVnQn8kzDUI52M4WPY/uGqboUxZi/6ym2WfrKg== X-Received: by 2002:a92:dac7:0:b0:33a:a6de:65be with SMTP id o7-20020a92dac7000000b0033aa6de65bemr14292389ilq.21.1689087587679; Tue, 11 Jul 2023 07:59:47 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id v6-20020a92cd46000000b00338a1272ce1sm658881ilq.52.2023.07.11.07.59.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 07:59:47 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Marek Vasut , Jan Kiszka , Simon Glass , Alper Nebi Yasak , Neha Malcom Francis , Peng Fan , Philippe Reynes , Stefan Herbrechtsmeier Subject: [PATCH v4 03/20] binman: Use GetEntries() to obtain section contents Date: Tue, 11 Jul 2023 08:59:05 -0600 Message-ID: <20230711145935.2289816-4-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.390.g38632f3daf-goog In-Reply-To: <20230711145935.2289816-1-sjg@chromium.org> References: <20230711145935.2289816-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.8 at phobos.denx.de X-Virus-Status: Clean Some section types don't have a simple _entries list. Use the GetEntries() method in GetEntryContents() and other places to handle this. This makes the behaviour more consistent. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/etype/section.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index 77250a7525c6..d56cc11d1023 100644 --- a/tools/binman/etype/section.py +++ b/tools/binman/etype/section.py @@ -720,7 +720,7 @@ class Entry_section(Entry): next_todo.append(entry) return entry - todo = self._entries.values() + todo = self.GetEntries().values() for passnum in range(3): threads = state.GetThreads() next_todo = [] @@ -893,7 +893,7 @@ class Entry_section(Entry): allow_missing: True if allowed, False if not allowed """ self.allow_missing = allow_missing - for entry in self._entries.values(): + for entry in self.GetEntries().values(): entry.SetAllowMissing(allow_missing) def SetAllowFakeBlob(self, allow_fake): @@ -903,7 +903,7 @@ class Entry_section(Entry): allow_fake: True if allowed, False if not allowed """ super().SetAllowFakeBlob(allow_fake) - for entry in self._entries.values(): + for entry in self.GetEntries().values(): entry.SetAllowFakeBlob(allow_fake) def CheckMissing(self, missing_list): @@ -915,7 +915,7 @@ class Entry_section(Entry): Args: missing_list: List of Entry objects to be added to """ - for entry in self._entries.values(): + for entry in self.GetEntries().values(): entry.CheckMissing(missing_list) def CheckFakedBlobs(self, faked_blobs_list): @@ -926,7 +926,7 @@ class Entry_section(Entry): Args: faked_blobs_list: List of Entry objects to be added to """ - for entry in self._entries.values(): + for entry in self.GetEntries().values(): entry.CheckFakedBlobs(faked_blobs_list) def CheckOptional(self, optional_list): @@ -937,7 +937,7 @@ class Entry_section(Entry): Args: optional_list (list): List of Entry objects to be added to """ - for entry in self._entries.values(): + for entry in self.GetEntries().values(): entry.CheckOptional(optional_list) def check_missing_bintools(self, missing_list): @@ -949,7 +949,7 @@ class Entry_section(Entry): missing_list: List of Bintool objects to be added to """ super().check_missing_bintools(missing_list) - for entry in self._entries.values(): + for entry in self.GetEntries().values(): entry.check_missing_bintools(missing_list) def _CollectEntries(self, entries, entries_by_name, add_entry): @@ -999,12 +999,12 @@ class Entry_section(Entry): entry.Raise(f'Missing required properties/entry args: {missing}') def CheckAltFormats(self, alt_formats): - for entry in self._entries.values(): + for entry in self.GetEntries().values(): entry.CheckAltFormats(alt_formats) def AddBintools(self, btools): super().AddBintools(btools) - for entry in self._entries.values(): + for entry in self.GetEntries().values(): entry.AddBintools(btools) def read_elf_segments(self): -- 2.41.0.390.g38632f3daf-goog