From: Maxwell Doose <m32285159@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Maxwell Doose <m32285159@gmail.com>,
Fabian Frederick <fabf@skynet.be>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] fs: efs: Fix compilation bug and use pr_debug()
Date: Thu, 4 Jun 2026 15:24:40 -0500 [thread overview]
Message-ID: <20260604202441.65226-1-m32285159@gmail.com> (raw)
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
next reply other threads:[~2026-06-04 20:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 20:24 Maxwell Doose [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260604202441.65226-1-m32285159@gmail.com \
--to=m32285159@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®