Skip to contentSkip to conversation

f2fs: make __allocate_new_segment() static

PATCH In review Wei Yongjun 2 participants 2 messages Jul 1, 2020 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs: make __allocate_new_segment() static

From: Hulk Robot <[email protected]>

From: Hulk Robot <[email protected]>

Fix sparse build warning:

fs/f2fs/segment.c:2736:6: warning:
symbol '__allocate_new_segment' was not declared. Should it be static?

---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/segment.c +1 -1
index b45e473508a9..c35614d255e1 100644
@@ -2733,7 +2733,7 @@ void f2fs_allocate_segment_for_resize(struct f2fs_sb_info *sbi, int type,
 	up_read(&SM_I(sbi)->curseg_lock);
 }
 
-void __allocate_new_segment(struct f2fs_sb_info *sbi, int type)
+static void __allocate_new_segment(struct f2fs_sb_info *sbi, int type)
 {
 	struct curseg_info *curseg = CURSEG_I(sbi, type);
 	unsigned int old_segno;
maintainer
#1 lore raw
Quoted 8 lines · Wei Yongjun

From: Hulk Robot <[email protected]>

From: Hulk Robot <[email protected]>

Fix sparse build warning:

fs/f2fs/segment.c:2736:6: warning:
symbol '__allocate_new_segment' was not declared. Should it be static?

It was fixed.
https://lore.kernel.org/linux-f2fs-devel/[email protected]/T/#m9667447e4d37672e26dee7e30896d129eac1c479

Quoted 19 lines
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/segment.c +1 -1
index b45e473508a9..c35614d255e1 100644
@@ -2733,7 +2733,7 @@ void f2fs_allocate_segment_for_resize(struct f2fs_sb_info *sbi, int type,
 	up_read(&SM_I(sbi)->curseg_lock);
 }
 
-void __allocate_new_segment(struct f2fs_sb_info *sbi, int type)
+static void __allocate_new_segment(struct f2fs_sb_info *sbi, int type)
 {
 	struct curseg_info *curseg = CURSEG_I(sbi, type);
 	unsigned int old_segno;