Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12a67146 authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

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: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 71e9fec5
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -791,11 +791,10 @@ static int __get_segment_type(struct page *page, enum page_type p_type)
		return __get_segment_type_2(page, p_type);
	case 4:
		return __get_segment_type_4(page, p_type);
	case 6:
		return __get_segment_type_6(page, p_type);
	default:
		BUG();
	}
	/* NR_CURSEG_TYPE(6) logs by default */
	BUG_ON(sbi->active_logs != NR_CURSEG_TYPE);
	return __get_segment_type_6(page, p_type);
}

static void do_write_page(struct f2fs_sb_info *sbi, struct page *page,
+1 −1
Original line number Diff line number Diff line
@@ -302,7 +302,7 @@ static int parse_options(struct f2fs_sb_info *sbi, char *options)
		case Opt_active_logs:
			if (args->from && match_int(args, &arg))
				return -EINVAL;
			if (arg != 2 && arg != 4 && arg != 6)
			if (arg != 2 && arg != 4 && arg != NR_CURSEG_TYPE)
				return -EINVAL;
			sbi->active_logs = arg;
			break;