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 9360FEB64DC for ; Mon, 10 Jul 2023 02:42:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6209186614; Mon, 10 Jul 2023 04:41:44 +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="epZ2p6ta"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 325E2865D5; Mon, 10 Jul 2023 04:41:37 +0200 (CEST) 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 9F429854A9 for ; Mon, 10 Jul 2023 04:41:32 +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-x12f.google.com with SMTP id e9e14a558f8ab-346541baf2aso2119335ab.1 for ; Sun, 09 Jul 2023 19:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1688956891; x=1691548891; 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=epZ2p6tamu3R9Yd5mCOoex65PNF4tLH0Q8pyhyM9hTVU/pmc/AybQssD2Q5U2liz8q 2PMxE0MgjqSYXMaL6hTPLZWH7+dLFUS8w0eN3DzRqIyfbBFce7OKK+tKXDHEAUqKi80N CVvzkAhokGLQFaIflID6wy9DFKx/S5yR3qGUk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688956891; x=1691548891; 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=YHwWcTCio9Dvyv0zWbyzdSatCIcz+O9n9ZuorupyZJFM1Q5jydvVfmMfiPw6d9UHuG fBdIyMg+cBNYGqCDr5jb8KvO0G4fHpeNJbu72O6kZyKAY8JhKfpmxKfYYCbOFJYyOd/N irzdim2h32nQEhL0Dta2UDd4EuzbAOSDmIqKXHUeRwtknBj3iuGNuCsRosB7DKyBhBnh E9UEDIDCz8/ornkZ6j7Rcfq7ZkxAuVA/BciUVyX4fDjohMwPh/GPHNdB55Fso/yT4uQG YDdyEEsg7ZIYyYvPkGzoFFtkiwxeUo12rB0hJ6QzPjl94d6D4EQ/T9dLuSPaNfWdyBwo LcEQ== X-Gm-Message-State: ABy/qLYY1eQE2v5IIVnARdOkFRR00lXqzk+++CtF7RAdizwlOj+2PSju AabmyFivb4DDVarwl5x+LoSem6N6Z16ZRz3713I= X-Google-Smtp-Source: APBJJlHZHyulQoYfBdEpuhVWclmlLUI6Xh7wRuhDBwT6uWk8XaQJ1PcGEG6jMfSVgA67NDjfH67BbA== X-Received: by 2002:a92:c082:0:b0:345:b4e0:35d3 with SMTP id h2-20020a92c082000000b00345b4e035d3mr8862277ile.9.1688956891195; Sun, 09 Jul 2023 19:41:31 -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 v22-20020a5ec116000000b00783581fd200sm3354025iol.20.2023.07.09.19.41.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jul 2023 19:41:31 -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 v3 03/19] binman: Use GetEntries() to obtain section contents Date: Sun, 9 Jul 2023 20:41:01 -0600 Message-ID: <20230710024123.2078645-4-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.390.g38632f3daf-goog In-Reply-To: <20230710024123.2078645-1-sjg@chromium.org> References: <20230710024123.2078645-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