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 9026EEB64DA for ; Wed, 28 Jun 2023 11:42:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9E98886618; Wed, 28 Jun 2023 13:42:43 +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="T3yuWan4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1719D865F1; Wed, 28 Jun 2023 13:42:20 +0200 (CEST) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 7B19386620 for ; Wed, 28 Jun 2023 13:42:13 +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-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-51d9123a8abso4677518a12.2 for ; Wed, 28 Jun 2023 04:42:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1687952532; x=1690544532; 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=Rl2p5QTrcdWtjP3BP7jY5Y1hKpIo6oSZjhMq3zD0mAU=; b=T3yuWan44yZInXdHmr5Jk5qO7NdyMR9WPIDTZezcz4VocXuTfTUlr/Zuvk817yXywG L6N2dsp+bDH8PQLipmKoKz+IOYafz7UW5dmlP5aIh7nMeg2NNLfeawFv7y75IM1CYZY9 WG0E7PilHY/K1nkOVKnVy831ihwTQxjPjmWW4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687952532; x=1690544532; 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=Rl2p5QTrcdWtjP3BP7jY5Y1hKpIo6oSZjhMq3zD0mAU=; b=OY828I7fKZQA8LrBIJO7GOT2IQ+apNhxWNq9v10mpNKbm1nuZjVYVsraJsfK2Pg9Mx ZsX1yJMsrATvtJlq01Xi7tbUb2oS/LKhmPUPoiFvc9H/ABmqfKGup6DYBGkm8S6yxt3e XYztgFv8zAb+DHySDZxZT9w10U2smJ6UJqoZpD8BN6888yQmy24ypRGk56LH9egrLN6X mNq/23JQ01bb+BVFONzXduEQYXs5vCGlXk7KuDhw7eiBuDygLsYtBAaexocS2bfLaknw 2c9sMpmy8BCqFTI6izLaGuz/5zPFB42F2JqdSLO4liAgJHT0tSuilklipRcM7CAaOo9S gOvw== X-Gm-Message-State: AC+VfDzKNyYs0Il3qCalZ1KWHoTWrlgQx3hgB0UiaF2QCCIFwvyqfsOu zZH7XODZNM7FHHvqtZOn/M7gi6CuPZGCOkOHmEPkog== X-Google-Smtp-Source: ACHHUZ4TWW6jxetWf7YzM5nCZZ21au+/JP2Evct0uyYtjygMzL4UKteneKSPcoTBqv1nsc99N3G0nw== X-Received: by 2002:aa7:d9cf:0:b0:516:459d:d913 with SMTP id v15-20020aa7d9cf000000b00516459dd913mr26308231eds.37.1687952532711; Wed, 28 Jun 2023 04:42:12 -0700 (PDT) Received: from sjg1.praguecc.cz ([193.85.242.128]) by smtp.gmail.com with ESMTPSA id r18-20020aa7cb92000000b0051bec856cb4sm4676423edt.50.2023.06.28.04.42.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 04:42:12 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Jan Kiszka , Simon Glass , Alper Nebi Yasak , Ivan Mikhaylov , Jonas Karlman , Neha Malcom Francis , Peng Fan , Philippe Reynes , Stefan Herbrechtsmeier Subject: [PATCH 02/12] binman: Use GetEntries() to obtain section contents Date: Wed, 28 Jun 2023 12:41:35 +0100 Message-ID: <20230628114149.439723-3-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog In-Reply-To: <20230628114149.439723-1-sjg@chromium.org> References: <20230628114149.439723-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 --- 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.162.gfafddb0af9-goog