* [f2fs-dev] [PATCH] f2fs: Remove unused curseg_segno() and curseg_alloc_type()
@ 2026-06-26 3:07 Zhan Xusheng
2026-06-29 12:01 ` Chao Yu via Linux-f2fs-devel
0 siblings, 1 reply; 2+ messages in thread
From: Zhan Xusheng @ 2026-06-26 3:07 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu; +Cc: Zhan Xusheng, linux-kernel, linux-f2fs-devel
The only callers of curseg_segno() and curseg_alloc_type() were removed by
commit 5a4fed7cd97a ("f2fs: simplify do_checkpoint"); both helpers have
been unused since then.
Being static inline functions they do not trigger -Wunused-function, so
the dead code has gone unnoticed. Remove them. No functional change.
Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
---
fs/f2fs/segment.h | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index b0c06b3580b4..33a2257da1e6 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -796,20 +796,6 @@ F2FS_IPU_POLICY(F2FS_IPU_ASYNC);
F2FS_IPU_POLICY(F2FS_IPU_NOCACHE);
F2FS_IPU_POLICY(F2FS_IPU_HONOR_OPU_WRITE);
-static inline unsigned int curseg_segno(struct f2fs_sb_info *sbi,
- int type)
-{
- struct curseg_info *curseg = CURSEG_I(sbi, type);
- return curseg->segno;
-}
-
-static inline unsigned char curseg_alloc_type(struct f2fs_sb_info *sbi,
- int type)
-{
- struct curseg_info *curseg = CURSEG_I(sbi, type);
- return curseg->alloc_type;
-}
-
static inline bool valid_main_segno(struct f2fs_sb_info *sbi,
unsigned int segno)
{
--
2.43.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: Remove unused curseg_segno() and curseg_alloc_type()
2026-06-26 3:07 [f2fs-dev] [PATCH] f2fs: Remove unused curseg_segno() and curseg_alloc_type() Zhan Xusheng
@ 2026-06-29 12:01 ` Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-06-29 12:01 UTC (permalink / raw)
To: Zhan Xusheng, Jaegeuk Kim; +Cc: Zhan Xusheng, linux-kernel, linux-f2fs-devel
On 6/26/26 11:07, Zhan Xusheng wrote:
> The only callers of curseg_segno() and curseg_alloc_type() were removed by
> commit 5a4fed7cd97a ("f2fs: simplify do_checkpoint"); both helpers have
> been unused since then.
>
> Being static inline functions they do not trigger -Wunused-function, so
> the dead code has gone unnoticed. Remove them. No functional change.
>
> Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-29 12:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-26 3:07 [f2fs-dev] [PATCH] f2fs: Remove unused curseg_segno() and curseg_alloc_type() Zhan Xusheng
2026-06-29 12:01 ` Chao Yu via Linux-f2fs-devel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox