From patchwork Tue Jan 6 22:03:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1305 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767737069; bh=nxHPc7UW2+W/vDILx/6E2ddeVlZJELWd8UHxq4bLloU=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=lpGEp770FXit++1I9t9C4P8wa6r4NEsq0WDJX3YQc4KIg0GlDwszIZEE+7L3ueCSN 169M8cojq7p7ZMewasiG/UYEHfeoaZ9SDvNdwwBZ/H+3v1i/xB+TNrSha2bA+TWMsE y9/Pzng1RQ7uf/YsT5Rerq/uh5BYVJ+W1eQHhUpVXs7JBRo206yL+SwQoT/D3f8y0g uQ4iZyaI5cjmaUqZcjovhpdmV6o5hYSG3vA3V3S+jQgTTkKfvaVsv9nU2JfLNPsvH0 4SFwDO2fYqJa6Jh4YxHwxSLx5jqCPMcD5IwKs42kTwGuc01GcR3LNT7tvtbnJ2qSgP uk3TLIbDJEfJQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4F04A690CB for ; Tue, 6 Jan 2026 15:04:29 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id WpW9onvnw3Z5 for ; Tue, 6 Jan 2026 15:04:29 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767737069; bh=nxHPc7UW2+W/vDILx/6E2ddeVlZJELWd8UHxq4bLloU=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=lpGEp770FXit++1I9t9C4P8wa6r4NEsq0WDJX3YQc4KIg0GlDwszIZEE+7L3ueCSN 169M8cojq7p7ZMewasiG/UYEHfeoaZ9SDvNdwwBZ/H+3v1i/xB+TNrSha2bA+TWMsE y9/Pzng1RQ7uf/YsT5Rerq/uh5BYVJ+W1eQHhUpVXs7JBRo206yL+SwQoT/D3f8y0g uQ4iZyaI5cjmaUqZcjovhpdmV6o5hYSG3vA3V3S+jQgTTkKfvaVsv9nU2JfLNPsvH0 4SFwDO2fYqJa6Jh4YxHwxSLx5jqCPMcD5IwKs42kTwGuc01GcR3LNT7tvtbnJ2qSgP uk3TLIbDJEfJQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3E7FF69155 for ; Tue, 6 Jan 2026 15:04:29 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767737068; bh=ZcCmH6kB8oOzQ24XVUGlUpAnN7lewM6SHLYG6BffBT0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UNazfo0S57SytA5bEAHthsLGz6kam4MG08VmckF+msFdVz/2sHivpDFUHSvUsa8lM lW4SKD7xRxXgn5fftFZk6X6GiWOUJW6kA8cTvyNJXEC5w7Tequg+ncn2B5Q10E/ObD QxOVfP1oGDnXiXBfb15OCmAW8aIXBip0Oir6j8c3NKIehBphUpvdz0O6fYjdZqmQ0f WaKv1ebSSOp5Ug08gKqDLPgoGRdYn8Hgj4WvEuNgELjT4xuG+lo8e7Tp2VmFEOrYHb XZKu7D3VuRWasPvtnVQW03/mdKtwXP1B/jyn0In9fsEylKcJTKLtU0j2BtAVLsXvzm ah18A4368VAEw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3636169155; Tue, 6 Jan 2026 15:04:28 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 4BdFO1826knZ; Tue, 6 Jan 2026 15:04:28 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767737063; bh=qkql9+QYvbmeZcvhlR6iNor1hpRknsPFJwFk3mhjWwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JofUg6Mmvm/cUeozrpgiyBpV/6Q/pnEDqHZDGwmUk01Kc7nLvvrARZej4ImcUkACX jO7tzoa7UbUPevE3roS7VS3dclRcPian+kdK5mSFKdOxyDqrA3x8fZSBGcay1jSyUw 1qDBjih03Lu02Ri5K6vgRWW241tTNT/C/qrmZsfv7C7InTlSLfAG36eC3CBW1jbeKa 8mBZ/RBu6Hi+7ov5tzuX+DSQgepCUr+jv6PGkfyAYkFj8NtDW0aN4I1DZflHKj4XrW Ua9PesoM0+BTVqQDI21tFoOuS4PnB8dY9jHaRnxETgdlgy35IruQFMOnhnq5jYNTw0 rso01tnsVNpog== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 5F7ED690CB; Tue, 6 Jan 2026 15:04:23 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 6 Jan 2026 15:03:20 -0700 Message-ID: <20260106220403.2915630-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260106220403.2915630-1-sjg@u-boot.org> References: <20260106220403.2915630-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: O2A7EBWQL7S4KEZVXGWMWVZ3MXV3XYH3 X-Message-ID-Hash: O2A7EBWQL7S4KEZVXGWMWVZ3MXV3XYH3 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 02/29] buildman: Fix bad indentation in builder.py List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Fix three locations with incorrect indentation: - _get_func_sizes_for_elf(): Body of if statement was over-indented - print_func_size_detail(): Loop body was over-indented - produce_result_summary(): Entire function body was over-indented These issues were flagged by pylint W0311 (bad-indentation). Co-developed-by: Claude Signed-off-by: Simon Glass --- tools/buildman/builder.py | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 4d8a083ddd9..cb349120467 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -737,12 +737,12 @@ class Builder: line = line.strip() parts = line.split() if line and len(parts) == 3: - size, type, name = line.split() - if type in NM_SYMBOL_TYPES: - # function names begin with '.' on 64-bit powerpc - if '.' in name[1:]: - name = 'static.' + name.split('.')[0] - sym[name] = sym.get(name, 0) + int(size, 16) + size, type, name = line.split() + if type in NM_SYMBOL_TYPES: + # function names begin with '.' on 64-bit powerpc + if '.' in name[1:]: + name = 'static.' + name.split('.')[0] + sym[name] = sym.get(name, 0) + int(size, 16) return sym def _process_config(self, fname): @@ -1064,12 +1064,12 @@ class Builder: delta.append([new[name], name]) for name in common: - diff = new.get(name, 0) - old.get(name, 0) - if diff > 0: - grow, up = grow + 1, up + diff - elif diff < 0: - shrink, down = shrink + 1, down - diff - delta.append([diff, name]) + diff = new.get(name, 0) - old.get(name, 0) + if diff > 0: + grow, up = grow + 1, up + diff + elif diff < 0: + shrink, down = shrink + 1, down - diff + delta.append([diff, name]) delta.sort() delta.reverse() @@ -1621,21 +1621,21 @@ class Builder: ', '.join(not_built))) def produce_result_summary(self, commit_upto, commits, board_selected): - (board_dict, err_lines, err_line_boards, warn_lines, - warn_line_boards, config, environment) = self.get_result_summary( - board_selected, commit_upto, - read_func_sizes=self._show_bloat, - read_config=self._show_config, - read_environment=self._show_environment) - if commits: - msg = '%02d: %s' % (commit_upto + 1, - commits[commit_upto].subject) - tprint(msg, colour=self.col.BLUE) - self.print_result_summary(board_selected, board_dict, - err_lines if self._show_errors else [], err_line_boards, - warn_lines if self._show_errors else [], warn_line_boards, - config, environment, self._show_sizes, self._show_detail, - self._show_bloat, self._show_config, self._show_environment) + (board_dict, err_lines, err_line_boards, warn_lines, + warn_line_boards, config, environment) = self.get_result_summary( + board_selected, commit_upto, + read_func_sizes=self._show_bloat, + read_config=self._show_config, + read_environment=self._show_environment) + if commits: + msg = '%02d: %s' % (commit_upto + 1, + commits[commit_upto].subject) + tprint(msg, colour=self.col.BLUE) + self.print_result_summary(board_selected, board_dict, + err_lines if self._show_errors else [], err_line_boards, + warn_lines if self._show_errors else [], warn_line_boards, + config, environment, self._show_sizes, self._show_detail, + self._show_bloat, self._show_config, self._show_environment) def show_summary(self, commits, board_selected): """Show a build summary for U-Boot for a given board list.