From patchwork Tue Dec 23 01:16:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1063 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=1766452613; bh=6BurHZGWY2wP/vDuQGkvYL8xg8xaA6EAIZVVLf1wy3E=; 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=vped/mRG43r1CEGA2vQwoHMyPDefwh7cmNk/ThupvPVZUOccJi3J/5l26yiKhiW3h +Ba9dn61JpRR5sOgKxgo6+HIdXtBHskvbhF47PqfSdN7diiAn5YIDR4H77fsZL5iRK R0lT8eKDIJYei4YcWJ3D1X5zqciTZAVHEBH7QhBB36ZUTboSJBoS2nKQ4KRMA7GV0b IUD2cCGVu/yTV2OAewDuc+k7dSMDp6GGkQ1CzU5GSRaprJFcx6k7jpDg+x7PlNQdeI k9kz3hZikt1zHtiBnSDBr6RkVcprlrNk+Bym7KOPoDr7kTWvMxu4FvZ+TYpGquk2qD U+1JbNyFRDcRg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DBFE664D95 for ; Mon, 22 Dec 2025 18:16:53 -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 xZvS_0rccG4s for ; Mon, 22 Dec 2025 18:16:53 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766452612; bh=6BurHZGWY2wP/vDuQGkvYL8xg8xaA6EAIZVVLf1wy3E=; 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=C8EJtNv2Xn+UTyber2ZGUcTfRvRVCF5CypNc0/G3f/WzWSrnc1sgNLNn6IdB/XW8N wYY8CDsDPFoUDopG4qSg6yH+SVFK/2l6JRW7EZHTq22y661XnmTq8JZp+IfVxA/m9K gQoOFi5Qklhq6Pd/u2eA0fcvkif6mfzWy2NeNzZjH6BYqoXEFS7Lrd0q5mubC9//93 6HkFVKRDwfulyzDveB+4SqpfKrz1TIlC3M1ou//MYiZagP2B1ewBBCtJ/odvvukuRR JNymIxrUysQFBJ9lbg3etCu23QuHoolO4ZdGgkcuYKk6lE2D/c4r2HfjgSIE4uE2wk RkX3FfQn2OlLg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ECA2564DA7 for ; Mon, 22 Dec 2025 18:16:52 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766452611; bh=XWHAa+05OrpuVphynoUIilL1DbiorK0kELPfpWClsxo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HY2Qe+5ECOeiRsUYmzPiDqLsznVZprCPaD5AEkYfKKHCUP9JUU6R1B60s++BGb1ZN b7w9kWa4B4F2vnJ9U+S3qDLPgXxVc1RV+02HM1Jji3COVH40AfwtR7ilPzzU6lyFmt qYqTfYjP0hlcKMh3j11Fu5Gj4+bFV+t5GcKanTCtD8gmjKZxLj0jAgi0f2rkGQH3lL 8Pajmy56LYtxjVoeqnfEWtOzz/f0CgYRlf8zg6/p2kpCx0lFvz50Khb19FzIPsA2LH jtmISrSrr8mO6i0x9PtUMjOcGgYWFpwDvHTSKtwLnUNKc5G84lmWium97QfB0TdCp4 AQ/nXqPSJKxvw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4C42964DA7; Mon, 22 Dec 2025 18:16:51 -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 0RYwqjzL8SlD; Mon, 22 Dec 2025 18:16:51 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766452607; bh=h2c9LXaRitX7FFAS1scNadc1/XEB7PUCxYlUy6Qpx5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BhKupmwm8lXZyqna8zuI9dlATChygYNVbXPZhwP5UIQKPI7KnsyCGKMYD/rnWKczP aOD3kCAgHn5Z75h+Ff0cHbypiHOFHCkrE4WPe717nngzT9OF2XEgtbwKpNiGDvo+JR yAaZL+onxFkZPvda42CqUYtvvgS3mQIeLZ3HI4AgCRIyI/6t3QSReNn/nVYFfSLmZQ ZdcP9rB4D6qE1yS6FvMDGAhjn0BXdEekP3k/tLq5DMVJLVqdVZdKSpfx3XJ9T/tOPB W9obL4yFpWVEYeLdBEWRzTZqGwZG51XdUnusTxKbnCun5SX+jSGRRG6EwwC8MyYXoq MqFHPvQZXSrEA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 700A264C17; Mon, 22 Dec 2025 18:16:47 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 22 Dec 2025 18:16:19 -0700 Message-ID: <20251223011632.380026-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251223011632.380026-1-sjg@u-boot.org> References: <20251223011632.380026-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: CDD2VCT7ZFAJML4FFENLTWRY7NLWTEL7 X-Message-ID-Hash: CDD2VCT7ZFAJML4FFENLTWRY7NLWTEL7 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 04/12] ext4l: Use EXT4L_PRINTF to enable ext4 diagnostic messages 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 Enable EXT4L_PRINTF when CONFIG_EXT4L_DEBUG is set so that ext4_msg() and other diagnostic macros print full messages instead of empty strings. Use EXT4L_PRINTF instead of CONFIG_PRINTK since U-Boot requires CONFIG_ options to be defined in Kconfig. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4.h | 2 +- fs/ext4l/ext4_uboot.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/fs/ext4l/ext4.h b/fs/ext4l/ext4.h index 5c37fcd76f9..b2f75437bbc 100644 --- a/fs/ext4l/ext4.h +++ b/fs/ext4l/ext4.h @@ -3237,7 +3237,7 @@ void __ext4_grp_locked_error(const char *, unsigned int, #define ext4_abort(sb, err, fmt, a...) \ __ext4_error((sb), __func__, __LINE__, true, (err), 0, (fmt), ## a) -#ifdef CONFIG_PRINTK +#ifdef EXT4L_PRINTF #define ext4_error_inode(inode, func, line, block, fmt, ...) \ __ext4_error_inode(inode, func, line, block, 0, fmt, ##__VA_ARGS__) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 6dd498c8f52..5c6e65b6e76 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -37,6 +37,17 @@ #include /* Real rbtree implementation */ #include /* For crc32() used by crc32_be */ +/* + * Enable ext4_msg() and other diagnostic macros to print full messages. + * This is needed for CONFIG_EXT4L_DEBUG to show useful error messages. + * + * Use EXT4L_PRINTF instead of CONFIG_PRINTK since U-Boot requires CONFIG_ + * options to be defined in Kconfig. + */ +#ifdef CONFIG_EXT4L_DEBUG +#define EXT4L_PRINTF 1 +#endif + /* * Override no_printk to avoid format warnings in disabled debug prints. * The Linux kernel uses sector_t as u64, but U-Boot uses unsigned long.