* [PATCH] fs: ubifs: remove dead code
@ 2026-05-12 5:50 Peter Collingbourne
2026-05-14 2:50 ` Heiko Schocher
0 siblings, 1 reply; 3+ messages in thread
From: Peter Collingbourne @ 2026-05-12 5:50 UTC (permalink / raw)
To: Tom Rini
Cc: Peter Collingbourne, Andrew Goodbody, Patrice Chotard, Peng Fan,
Yao Zi, u-boot, Kyungmin Park, Heiko Schocher
This code is dead because it appears after an infinite loop; remove it.
Fixes: 4c4477c77008 ("fs: ubifs: fix bugs involving symlinks in ubifs_findfile")
Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
---
fs/ubifs/ubifs.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index aafbd01a028..3f2e2037745 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -608,9 +608,6 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename)
root_inum = inum;
name = next;
}
-
- kfree(buf);
- return 0;
}
int ubifs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info)
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: ubifs: remove dead code
2026-05-12 5:50 [PATCH] fs: ubifs: remove dead code Peter Collingbourne
@ 2026-05-14 2:50 ` Heiko Schocher
2026-05-14 3:08 ` Peter Collingbourne
0 siblings, 1 reply; 3+ messages in thread
From: Heiko Schocher @ 2026-05-14 2:50 UTC (permalink / raw)
To: Peter Collingbourne, Tom Rini
Cc: Andrew Goodbody, Patrice Chotard, Peng Fan, Yao Zi, u-boot,
Kyungmin Park
Hello Peter,
On 12.05.26 07:50, Peter Collingbourne wrote:
> This code is dead because it appears after an infinite loop; remove it.
>
> Fixes: 4c4477c77008 ("fs: ubifs: fix bugs involving symlinks in ubifs_findfile")
Wrong commit ID? I find in current HEAD:
"""
commit d5888d509cc43942ec98d993f2d129f5c8ddc432
Author: Peter Collingbourne <peter@pcc.me.uk>
Date: Tue May 5 03:38:16 2026 -0700
fs: ubifs: fix bugs involving symlinks in ubifs_findfile
"""
> Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
> ---
> fs/ubifs/ubifs.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
> index aafbd01a028..3f2e2037745 100644
> --- a/fs/ubifs/ubifs.c
> +++ b/fs/ubifs/ubifs.c
> @@ -608,9 +608,6 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename)
> root_inum = inum;
> name = next;
> }
> -
> - kfree(buf);
> - return 0;
May we need to stay with "return 0;" at the end of the function, as
some source code checking tool will claim if there is none?
Beside of the nitpick:
Reviewed-by: Heiko Schocher <hs@nabladev.com>
If you find time to send a v2 with updated commit ID I would be happy,
else I can fix it when picking up the patch, if okay for you.
Thanks!
bye,
Heiko
--
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: office@nabladev.com
Geschäftsführer : Stefano Babic
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: ubifs: remove dead code
2026-05-14 2:50 ` Heiko Schocher
@ 2026-05-14 3:08 ` Peter Collingbourne
0 siblings, 0 replies; 3+ messages in thread
From: Peter Collingbourne @ 2026-05-14 3:08 UTC (permalink / raw)
To: Heiko Schocher
Cc: Tom Rini, Andrew Goodbody, Patrice Chotard, Peng Fan, Yao Zi,
u-boot, Kyungmin Park
Hi Heiko,
On Wed, May 13, 2026 at 7:50 PM Heiko Schocher <hs@nabladev.com> wrote:
>
> Hello Peter,
>
> On 12.05.26 07:50, Peter Collingbourne wrote:
> > This code is dead because it appears after an infinite loop; remove it.
> >
> > Fixes: 4c4477c77008 ("fs: ubifs: fix bugs involving symlinks in ubifs_findfile")
>
> Wrong commit ID? I find in current HEAD:
> """
> commit d5888d509cc43942ec98d993f2d129f5c8ddc432
> Author: Peter Collingbourne <peter@pcc.me.uk>
> Date: Tue May 5 03:38:16 2026 -0700
>
> fs: ubifs: fix bugs involving symlinks in ubifs_findfile
> """
Yeah, I see the same. Looks like I accidentally used my original
commit ID instead of the one that was pushed.
> > Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
> > ---
> > fs/ubifs/ubifs.c | 3 ---
> > 1 file changed, 3 deletions(-)
> >
> > diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
> > index aafbd01a028..3f2e2037745 100644
> > --- a/fs/ubifs/ubifs.c
> > +++ b/fs/ubifs/ubifs.c
> > @@ -608,9 +608,6 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename)
> > root_inum = inum;
> > name = next;
> > }
> > -
> > - kfree(buf);
> > - return 0;
>
> May we need to stay with "return 0;" at the end of the function, as
> some source code checking tool will claim if there is none?
I'd probably remove it unless some tool complains. If there's code at
the end it can mislead readers into thinking it's reachable, which is
how I ended up adding the kfree() there in the first place.
> Beside of the nitpick:
>
> Reviewed-by: Heiko Schocher <hs@nabladev.com>
>
> If you find time to send a v2 with updated commit ID I would be happy,
> else I can fix it when picking up the patch, if okay for you.
Feel free to fix it up, thanks.
Peter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-14 5:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 5:50 [PATCH] fs: ubifs: remove dead code Peter Collingbourne
2026-05-14 2:50 ` Heiko Schocher
2026-05-14 3:08 ` Peter Collingbourne
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.