mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs: efs: Fix compilation bug and use pr_debug()
@ 2026-06-04 20:24 Maxwell Doose
  2026-06-04 21:30 ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Maxwell Doose @ 2026-06-04 20:24 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Maxwell Doose, Fabian Frederick, open list

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@gmail.com>
---
 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-06-05 16:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-04 20:24 [PATCH] fs: efs: Fix compilation bug and use pr_debug() Maxwell Doose
2026-06-04 21:30 ` Andrew Morton
2026-06-05  1:40   ` Maxwell Doose
2026-06-05  2:53     ` Andrew Morton
2026-06-05  3:16       ` Maxwell Doose
2026-06-05  3:27         ` Matthew Wilcox
2026-06-05  3:33           ` Maxwell Doose
2026-06-05 16:59             ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®