aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2012-12-20 21:47:05 -0500
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2012-12-27 21:24:09 -0500
commit12a67146e35ba1d04ac4a5430eaaa8790158d60e (patch)
tree9a3a2c0768d04fba20e0be8cc07f9cb6ae4a71c5 /fs/f2fs
parent71e9fec548a95b2a4cf378646addd5d3098684a2 (diff)
f2fs: return a default value for non-void function
This patch resolves a build warning reported by kbuild test robot. " fs/f2fs/segment.c: In function '__get_segment_type': fs/f2fs/segment.c:806:1: warning: control reaches end of non-void function [-Wreturn-type] " Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/segment.c7
-rw-r--r--fs/f2fs/super.c2
2 files changed, 4 insertions, 5 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index ca7b5ffb09d5..fe2cc0bdc115 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -791,11 +791,10 @@ static int __get_segment_type(struct page *page, enum page_type p_type)
791 return __get_segment_type_2(page, p_type); 791 return __get_segment_type_2(page, p_type);
792 case 4: 792 case 4:
793 return __get_segment_type_4(page, p_type); 793 return __get_segment_type_4(page, p_type);
794 case 6:
795 return __get_segment_type_6(page, p_type);
796 default:
797 BUG();
798 } 794 }
795 /* NR_CURSEG_TYPE(6) logs by default */
796 BUG_ON(sbi->active_logs != NR_CURSEG_TYPE);
797 return __get_segment_type_6(page, p_type);
799} 798}
800 799
801static void do_write_page(struct f2fs_sb_info *sbi, struct page *page, 800static void do_write_page(struct f2fs_sb_info *sbi, struct page *page,
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 50240d28ca24..cf0ffb800654 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -302,7 +302,7 @@ static int parse_options(struct f2fs_sb_info *sbi, char *options)
302 case Opt_active_logs: 302 case Opt_active_logs:
303 if (args->from && match_int(args, &arg)) 303 if (args->from && match_int(args, &arg))
304 return -EINVAL; 304 return -EINVAL;
305 if (arg != 2 && arg != 4 && arg != 6) 305 if (arg != 2 && arg != 4 && arg != NR_CURSEG_TYPE)
306 return -EINVAL; 306 return -EINVAL;
307 sbi->active_logs = arg; 307 sbi->active_logs = arg;
308 break; 308 break;