All of lore.kernel.org
 help / color / mirror / Atom feed
* + fs-efs-remove-unneeded-debug-prints.patch added to mm-nonmm-unstable branch
@ 2026-06-06  1:32 Andrew Morton
  2026-06-06  2:28 ` Maxwell Doose
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2026-06-06  1:32 UTC (permalink / raw)
  To: mm-commits, fabf, brauner, akpm, m32285159, akpm


The patch titled
     Subject: fs: efs: remove unneeded debug prints
has been added to the -mm mm-nonmm-unstable branch.  Its filename is
     fs-efs-remove-unneeded-debug-prints.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/fs-efs-remove-unneeded-debug-prints.patch

This patch will later appear in the mm-nonmm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: Maxwell Doose <m32285159@gmail.com>
Subject: fs: efs: remove unneeded debug prints
Date: Thu, 4 Jun 2026 22:52:51 -0500

The current code uses debug prints conditionally compiled with #ifdef
DEBUG.  However, that code, when compiled, causes compiler errors due to
incompatible formatters and undefined variables, notably:

fs/efs/file.c: In function `efs_get_block':
fs/efs/file.c:26:35: error: `block' undeclared (first use in this
function); did you mean `iblock'?
  26 |                         __func__, block, inode->i_blocks, inode->i_size);
     |                                   ^~~~~

and:

fs/efs/file.c: In function `efs_bmap':
./include/linux/kern_levels.h:5:25: error: format `%ld' expects
argument of type `long int', but argument 4 has type `blkcnt_t' {aka
`long long unsigned int'} [-Werror=format=]
   5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
     |                         ^~~~~~

which also extends to the other formatters.  As this part of the code has
been dead for just about 14 years now, it has not been modernized to stay
compatible with the most recent gcc compilers.  Fix these issues by
removing the debug prints.

Link: https://lore.kernel.org/20260605035251.89305-2-m32285159@gmail.com
Fixes: f403d1dbac6d ("fs/efs: add pr_fmt / use __func__")
Signed-off-by: Maxwell Doose <m32285159@gmail.com>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/efs/file.c |   21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)

--- a/fs/efs/file.c~fs-efs-remove-unneeded-debug-prints
+++ a/fs/efs/file.c
@@ -18,16 +18,9 @@ int efs_get_block(struct inode *inode, s
 
 	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
+	if (iblock >= inode->i_blocks)
 		return 0;
-	}
+
 	phys = efs_map_block(inode, iblock);
 	if (phys)
 		map_bh(bh_result, inode->i_sb, phys);
@@ -42,16 +35,8 @@ int efs_bmap(struct inode *inode, efs_bl
 	}
 
 	/* 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
+	if (!(block < inode->i_blocks))
 		return 0;
-	}
 
 	return efs_map_block(inode, block);
 }
_

Patches currently in -mm which might be from m32285159@gmail.com are

fs-fat-inode-replace-sprintf-with-scnprintf.patch
fs-efs-remove-unneeded-debug-prints.patch


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

* Re: + fs-efs-remove-unneeded-debug-prints.patch added to mm-nonmm-unstable branch
  2026-06-06  1:32 + fs-efs-remove-unneeded-debug-prints.patch added to mm-nonmm-unstable branch Andrew Morton
@ 2026-06-06  2:28 ` Maxwell Doose
  2026-06-06  2:35   ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Maxwell Doose @ 2026-06-06  2:28 UTC (permalink / raw)
  To: Andrew Morton; +Cc: mm-commits, fabf, brauner

On Fri, Jun 5, 2026 at 8:32 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> The patch titled
>      Subject: fs: efs: remove unneeded debug prints
> has been added to the -mm mm-nonmm-unstable branch.  Its filename is
>      fs-efs-remove-unneeded-debug-prints.patch
>
> This patch will shortly appear at
>      https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/fs-efs-remove-unneeded-debug-prints.patch
>
> This patch will later appear in the mm-nonmm-unstable branch at
>     git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
>

Thanks for merging this. I know that EFS is orphaned, so I was
wondering if I could step up to maintain it. Mathew Wilcox had
mentioned how this filesystem is incredibly outdated and it should
probably see conversion to a FUSE, however in the meantime it should
probably see more fixes, modernizations, dead code removal, etc. I
hope I'm not being too hasty, given I've only sent about 2 patches in
fs!

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

* Re: + fs-efs-remove-unneeded-debug-prints.patch added to mm-nonmm-unstable branch
  2026-06-06  2:28 ` Maxwell Doose
@ 2026-06-06  2:35   ` Andrew Morton
  2026-06-06  2:36     ` Maxwell Doose
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2026-06-06  2:35 UTC (permalink / raw)
  To: Maxwell Doose; +Cc: mm-commits, fabf, brauner

On Fri, 5 Jun 2026 21:28:03 -0500 Maxwell Doose <m32285159@gmail.com> wrote:

> On Fri, Jun 5, 2026 at 8:32 PM Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > The patch titled
> >      Subject: fs: efs: remove unneeded debug prints
> > has been added to the -mm mm-nonmm-unstable branch.  Its filename is
> >      fs-efs-remove-unneeded-debug-prints.patch
> >
> > This patch will shortly appear at
> >      https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/fs-efs-remove-unneeded-debug-prints.patch
> >
> > This patch will later appear in the mm-nonmm-unstable branch at
> >     git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
> >
> 
> Thanks for merging this. I know that EFS is orphaned, so I was
> wondering if I could step up to maintain it. Mathew Wilcox had
> mentioned how this filesystem is incredibly outdated and it should
> probably see conversion to a FUSE, however in the meantime it should
> probably see more fixes, modernizations, dead code removal, etc. I
> hope I'm not being too hasty, given I've only sent about 2 patches in
> fs!

Fine by me, and thanks.  But I believe Christian is the guy to speak
with regarding this.

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

* Re: + fs-efs-remove-unneeded-debug-prints.patch added to mm-nonmm-unstable branch
  2026-06-06  2:35   ` Andrew Morton
@ 2026-06-06  2:36     ` Maxwell Doose
  0 siblings, 0 replies; 4+ messages in thread
From: Maxwell Doose @ 2026-06-06  2:36 UTC (permalink / raw)
  To: Andrew Morton; +Cc: mm-commits, fabf, brauner

On Fri, Jun 5, 2026 at 9:35 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Fri, 5 Jun 2026 21:28:03 -0500 Maxwell Doose <m32285159@gmail.com> wrote:
>
> > On Fri, Jun 5, 2026 at 8:32 PM Andrew Morton <akpm@linux-foundation.org> wrote:
> > >
> > > The patch titled
> > >      Subject: fs: efs: remove unneeded debug prints
> > > has been added to the -mm mm-nonmm-unstable branch.  Its filename is
> > >      fs-efs-remove-unneeded-debug-prints.patch
> > >
> > > This patch will shortly appear at
> > >      https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/fs-efs-remove-unneeded-debug-prints.patch
> > >
> > > This patch will later appear in the mm-nonmm-unstable branch at
> > >     git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
> > >
> >
> > Thanks for merging this. I know that EFS is orphaned, so I was
> > wondering if I could step up to maintain it. Mathew Wilcox had
> > mentioned how this filesystem is incredibly outdated and it should
> > probably see conversion to a FUSE, however in the meantime it should
> > probably see more fixes, modernizations, dead code removal, etc. I
> > hope I'm not being too hasty, given I've only sent about 2 patches in
> > fs!
>
> Fine by me, and thanks.  But I believe Christian is the guy to speak
> with regarding this.

Thanks, I'll shoot him an email and note that you were fine with it.

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

end of thread, other threads:[~2026-06-06  2:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-06  1:32 + fs-efs-remove-unneeded-debug-prints.patch added to mm-nonmm-unstable branch Andrew Morton
2026-06-06  2:28 ` Maxwell Doose
2026-06-06  2:35   ` Andrew Morton
2026-06-06  2:36     ` Maxwell Doose

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.