From patchwork Sat Dec 20 23:23:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 995 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=1766273052; bh=3HW0ASUi94oIB769QOsV61yygAE9IrXcHDT7l1utjgg=; 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=jOaQJwxOECQs9ra+COuWZf1XFcZsiXXMxjGpZI8JFGGKv6YogeaaQeQO4P8IBXI7e n4U6KUC2kBt57dMTffNXTHBcb/xDtO9gFX9/JRjLbwL9P2xwRHeZqkAic7mgAM2tvG TjbQpZyx4V7f/eMO5+2eHSZGOYhADYbRtUDDyDQesaf0tOvP1Okuo3WyDOglEtKyM1 eByufqAUafyHNmwdjmOUyx+q7grWPzpcV3w1NaoeTI693lbUuMP03m7lpBvcL/1fFU a53MFiJpNCz3M4seRP0E/4/xpBLP8P+X8YT/iQifyvT7WfxNTrdySYsMbU97F/NsUB im3tmRqf9p9/g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 541F064C8E for ; Sat, 20 Dec 2025 16:24:12 -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 l28LDdOxDo19 for ; Sat, 20 Dec 2025 16:24:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766273052; bh=3HW0ASUi94oIB769QOsV61yygAE9IrXcHDT7l1utjgg=; 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=jOaQJwxOECQs9ra+COuWZf1XFcZsiXXMxjGpZI8JFGGKv6YogeaaQeQO4P8IBXI7e n4U6KUC2kBt57dMTffNXTHBcb/xDtO9gFX9/JRjLbwL9P2xwRHeZqkAic7mgAM2tvG TjbQpZyx4V7f/eMO5+2eHSZGOYhADYbRtUDDyDQesaf0tOvP1Okuo3WyDOglEtKyM1 eByufqAUafyHNmwdjmOUyx+q7grWPzpcV3w1NaoeTI693lbUuMP03m7lpBvcL/1fFU a53MFiJpNCz3M4seRP0E/4/xpBLP8P+X8YT/iQifyvT7WfxNTrdySYsMbU97F/NsUB im3tmRqf9p9/g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3D6BB64C29 for ; Sat, 20 Dec 2025 16:24:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766273049; bh=2YR5YUUysaYuc8rypoFCzV7Ze5x8iptCGOhcXypL/mk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jtqRn1S93lLMK+WDoNe0A18ZjqcYb6w7728m1FiOXxiOZMQd4LjOX/p3DovK35xyP UzcjSMTw+t0FYmwvZf+bTo/ystaJBwF4deosSCrH4TeArn1R52cw26obkKI11Hx4Gs Ktd8YNhyX1S6oeKICwbIrM6lr5p6i72nEA+qeazeUrQUjCtZG/37EbkPT3SxXaYE5h YjxgomsCd5n9l11I1ev76q37hCUeuZIzfG9oqhGTqu2TiFULWypVlBFSKB8n5xZq8O pplC3BX9N3RV+lrfoBrj6GeNsHVoOvlfjYdR6JFJMbzCDXswlSWzNG5zxNE6qoz0QL P9Zwj1iWcIP8g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E16D564C56; Sat, 20 Dec 2025 16:24:09 -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 0bngALKqWrIO; Sat, 20 Dec 2025 16:24:09 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766273049; bh=5UUDcbVCIjeXxDjAyB5T8EVZZvaeKprMWbsyNr5c6sk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XJuJ9X5AbG0LCMUVHuKiQItWkkjTVl3CCdBqFIqYdjZbkHxUTyzYlxV37Auhf4qNj gZhSSEpIj6oZHa9ek6C07ptIsrPs7watELIZn2UXbfITYGny5wywZDkvnwfFrJuDeP 5nV+28sab38h7PKdWvcmQBYl9vm7aFLr6itmRJNUkVAWIbuIPK4inOz5HiN4+UPGHA K0DEa8dMyVpU7PkX/p2RVpLLQ0KzLKKTzrrzUiFT2mOlJlo2YAQY1Pbz+4g6YqX5qX STzB2fGhhePgcYpsZGfRi2x9WJ13LoYp9c5wyaQbkWTVwA8PqfrQImVbP4TU1SLNh6 xwRlOT2I8Y5BQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 4962B64C25; Sat, 20 Dec 2025 16:24:09 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 20 Dec 2025 16:23:41 -0700 Message-ID: <20251220232355.845414-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251220232355.845414-1-sjg@u-boot.org> References: <20251220232355.845414-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: X4CXYT7JA32ZHTR3MO7QMCANLABJW7SZ X-Message-ID-Hash: X4CXYT7JA32ZHTR3MO7QMCANLABJW7SZ 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 Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 01/10] ext4l: Fix unused variable warnings in extents_status.c 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 Mark variables as __maybe_unused where they are only used in macro calls that expand to no-ops in U-Boot's single-threaded environment: - tree in ext4_es_try_to_merge_left/right - es_stats in ext4_seq_es_shrinker_info_show - ei in ext4_clear_inode_es, ext4_remove_pending, ext4_is_pending Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/extents_status.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ext4l/extents_status.c b/fs/ext4l/extents_status.c index 9c303fbe48f..72377fadd70 100644 --- a/fs/ext4l/extents_status.c +++ b/fs/ext4l/extents_status.c @@ -599,7 +599,7 @@ static int ext4_es_can_be_merged(struct extent_status *es1, static struct extent_status * ext4_es_try_to_merge_left(struct inode *inode, struct extent_status *es) { - struct ext4_es_tree *tree = &EXT4_I(inode)->i_es_tree; + struct ext4_es_tree *tree __maybe_unused = &EXT4_I(inode)->i_es_tree; struct extent_status *es1; struct rb_node *node; @@ -623,7 +623,7 @@ ext4_es_try_to_merge_left(struct inode *inode, struct extent_status *es) static struct extent_status * ext4_es_try_to_merge_right(struct inode *inode, struct extent_status *es) { - struct ext4_es_tree *tree = &EXT4_I(inode)->i_es_tree; + struct ext4_es_tree *tree __maybe_unused = &EXT4_I(inode)->i_es_tree; struct extent_status *es1; struct rb_node *node; @@ -1704,7 +1704,7 @@ static unsigned long ext4_es_scan(struct shrinker *shrink, int ext4_seq_es_shrinker_info_show(struct seq_file *seq, void *v) { struct ext4_sb_info *sbi = EXT4_SB((struct super_block *) seq->private); - struct ext4_es_stats *es_stats = &sbi->s_es_stats; + struct ext4_es_stats *es_stats __maybe_unused = &sbi->s_es_stats; struct ext4_inode_info *ei, *max = NULL; unsigned int inode_cnt = 0; @@ -1886,7 +1886,7 @@ static int es_reclaim_extents(struct ext4_inode_info *ei, int *nr_to_scan) */ void ext4_clear_inode_es(struct inode *inode) { - struct ext4_inode_info *ei = EXT4_I(inode); + struct ext4_inode_info *ei __maybe_unused = EXT4_I(inode); struct extent_status *es; struct ext4_es_tree *tree; struct rb_node *node; @@ -2069,7 +2069,7 @@ static void __remove_pending(struct inode *inode, ext4_lblk_t lblk) */ void ext4_remove_pending(struct inode *inode, ext4_lblk_t lblk) { - struct ext4_inode_info *ei = EXT4_I(inode); + struct ext4_inode_info *ei __maybe_unused = EXT4_I(inode); write_lock(&ei->i_es_lock); __remove_pending(inode, lblk); @@ -2089,7 +2089,7 @@ void ext4_remove_pending(struct inode *inode, ext4_lblk_t lblk) bool ext4_is_pending(struct inode *inode, ext4_lblk_t lblk) { struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); - struct ext4_inode_info *ei = EXT4_I(inode); + struct ext4_inode_info *ei __maybe_unused = EXT4_I(inode); bool ret; read_lock(&ei->i_es_lock);