Skip to content

Commit 133de5a

Browse files
Kemeng Shitytso
authored andcommitted
ext4: remove unused return value of __mb_check_buddy
Remove unused return value of __mb_check_buddy. Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20240105092102.496631-2-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent c5f3a38 commit 133de5a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fs/ext4/mballoc.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ do { \
677677
} \
678678
} while (0)
679679

680-
static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
680+
static void __mb_check_buddy(struct ext4_buddy *e4b, char *file,
681681
const char *function, int line)
682682
{
683683
struct super_block *sb = e4b->bd_sb;
@@ -696,7 +696,7 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
696696
void *buddy2;
697697

698698
if (e4b->bd_info->bb_check_counter++ % 10)
699-
return 0;
699+
return;
700700

701701
while (order > 1) {
702702
buddy = mb_find_buddy(e4b, order, &max);
@@ -758,7 +758,7 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
758758

759759
grp = ext4_get_group_info(sb, e4b->bd_group);
760760
if (!grp)
761-
return NULL;
761+
return;
762762
list_for_each(cur, &grp->bb_prealloc_list) {
763763
ext4_group_t groupnr;
764764
struct ext4_prealloc_space *pa;
@@ -768,7 +768,6 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
768768
for (i = 0; i < pa->pa_len; i++)
769769
MB_CHECK_ASSERT(mb_test_bit(k + i, buddy));
770770
}
771-
return 0;
772771
}
773772
#undef MB_CHECK_ASSERT
774773
#define mb_check_buddy(e4b) __mb_check_buddy(e4b, \

0 commit comments

Comments
 (0)