[PATCH] fs: efs: Fix compilation bug and use pr_debug()

From: Maxwell Doose

Date: Thu Jun 04 2026 - 16:28:38 EST


Firstly, the current code uses formatters that are incompatible with the
most recent GCC for x86_64. Replace them and explicitly cast the
formatted variables to their respective forms of long long.

Secondly, replace the legacy conditional compilation for DEBUG with the
more preferred pr_debug() to condense the code, while keeping the final
output functionally identical.

Fixes: f403d1dbac6d ("fs/efs: add pr_fmt / use __func__")
Signed-off-by: Maxwell Doose <m32285159@xxxxxxxxx>
---
Test compiled only with gcc 16.1.1 for x86_64.

fs/efs/file.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/fs/efs/file.c b/fs/efs/file.c
index 9e641da6fab2..625b715f2d96 100644
--- a/fs/efs/file.c
+++ b/fs/efs/file.c
@@ -19,13 +19,12 @@ int efs_get_block(struct inode *inode, sector_t iblock,
if (create)
return error;
if (iblock >= inode->i_blocks) {
-#ifdef DEBUG
/*
* i have no idea why this happens as often as it does
*/
- pr_warn("%s(): block %d >= %ld (filesize %ld)\n",
- __func__, block, inode->i_blocks, inode->i_size);
-#endif
+ pr_debug("EFS: block %llu >= %llu (filesize %lld)\n",
+ (unsigned long long)iblock, (unsigned long long)inode->i_blocks,
+ (long long)inode->i_size);
return 0;
}
phys = efs_map_block(inode, iblock);
@@ -43,13 +42,12 @@ int efs_bmap(struct inode *inode, efs_block_t block) {

/* are we about to read past the end of a file ? */
if (!(block < inode->i_blocks)) {
-#ifdef DEBUG
/*
* i have no idea why this happens as often as it does
*/
- pr_warn("%s(): block %d >= %ld (filesize %ld)\n",
- __func__, block, inode->i_blocks, inode->i_size);
-#endif
+ pr_debug("EFS: block %llu >= %llu (filesize %lld)\n",
+ (unsigned long long)block, (unsigned long long)inode->i_blocks,
+ (long long)inode->i_size);
return 0;
}

--
2.54.0