From patchwork Mon Oct 26 23:40:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1388213 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: 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=f2Oea+N7; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 ozlabs.org (Postfix) with ESMTPS id 4CKs0t3ZK6z9sTf for ; Tue, 27 Oct 2020 10:46:06 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6D11B8251D; Tue, 27 Oct 2020 00:41:17 +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="f2Oea+N7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4243D824E8; Tue, 27 Oct 2020 00:40:56 +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.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (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 41761824BC for ; Tue, 27 Oct 2020 00:40:48 +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-io1-xd41.google.com with SMTP id k21so13004681ioa.9 for ; Mon, 26 Oct 2020 16:40:48 -0700 (PDT) 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=2BCJJc42Wa4sFcRG345GyErTu7UdVTyNzV/ZE3AZyzw=; b=f2Oea+N782xNyqVirE8+vLl6okEyQzjJtCps0qNhD8gDz8FQEiLcK5FIbtCxIMX+hv MxjHIetqMAKtEZw6DoMZF10mNAO+dHIrnp0OUyKwjDZEqKP/fud2o1ngn3ubHKwKMC1w IA4Ewcxt4O7lJFKKAW9bdoUJek3RZ+xkz2YbY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2BCJJc42Wa4sFcRG345GyErTu7UdVTyNzV/ZE3AZyzw=; b=N1mhl2h37xli4W+fI4LvKpr7v5NKmfBzFcXaofO1LTVIXMHunLdPD7zMo04nn2GkJz aZOcKNQySo8h4AaDdSSyISHU3jqPCmJDWQ35FP3/YSDecKyngR6XHPJmzZDsyf3hT4wF N70pgBs+i/VC+uXSpySD78RNJ9qsEya/K9ZS0EZOgYP+vegYBqMMaM9FNpXhehYE3zlN E8xy7f+Ye4W4YAcnBR31HInxBuj9rfwnbtD6nYfhlz0jHk+4Gfy2i+AA2E3iw4hCANbX cLJ4j8H7cR+SabdOuwER7EP+PSdsk3Qaa9RTXq+RS3EI3fLeGv3S52XD1PfRZBsVEZSX XOLw== X-Gm-Message-State: AOAM531eRTIP20dna7/6Do0iXr5o1ksPrgBXmtMH7xJp2UJmtkG9VC9+ lIvhB30OxiytdPxfHgZvfxO6yONBVI/8/U1c X-Google-Smtp-Source: ABdhPJy0NGbHdLz1MNh/irlVbacH+tVYiu8yeOf01NBCXRDjd3lXdvl5bUPrm5joigcJcdRVlcYBHg== X-Received: by 2002:a6b:bbc6:: with SMTP id l189mr12691158iof.145.1603755647056; Mon, 26 Oct 2020 16:40:47 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id e17sm7066857ile.60.2020.10.26.16.40.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 16:40:46 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Alper Nebi Yasak , Simon Glass Subject: [PATCH v2 20/28] binman: Drop Entry.CheckOffset() Date: Mon, 26 Oct 2020 17:40:18 -0600 Message-Id: <20201026234026.1903778-20-sjg@chromium.org> X-Mailer: git-send-email 2.29.0.rc2.309.g374f81d7ae-goog In-Reply-To: <20201026234026.1903778-1-sjg@chromium.org> References: <20201026234026.1903778-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean This function just calls CheckEntries() in the only non-trivial implementation. Drop it and use CheckEntries() directly. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/entry.py | 2 +- tools/binman/etype/section.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/binman/entry.py b/tools/binman/entry.py index 8fa1dcef2da..8946d2bc02f 100644 --- a/tools/binman/entry.py +++ b/tools/binman/entry.py @@ -520,7 +520,7 @@ class Entry(object): """ pass - def CheckOffset(self): + def CheckEntries(self): """Check that the entry offsets are correct This is used for entries which have extra offset requirements (other diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index 2812989ba1a..fb4bf640bfb 100644 --- a/tools/binman/etype/section.py +++ b/tools/binman/etype/section.py @@ -296,7 +296,7 @@ class Entry_section(Entry): offset = 0 prev_name = 'None' for entry in self._entries.values(): - entry.CheckOffset() + entry.CheckEntries() if (entry.offset < self._skip_at_start or entry.offset + entry.size > self._skip_at_start + self.size): @@ -337,9 +337,6 @@ class Entry_section(Entry): sizes_ok = False return sizes_ok and sizes_ok_base - def CheckOffset(self): - self.CheckEntries() - def WriteMap(self, fd, indent): """Write a map of the section to a .map file