From: wuchi Date: Sat, 1 Apr 2023 07:53:03 +0000 (+0800) Subject: ext4: remove useless conditional branch code X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=17809d3cf801374d7c23101800770ea34951f3c8;p=linux.git ext4: remove useless conditional branch code It's ok because the code will be optimized by the compiler, just try to simple the code. Signed-off-by: wuchi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230401075303.45206-1-wuchi.zero@gmail.com Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/bitmap.c b/fs/ext4/bitmap.c index 87c1c8ae92985..cd725bebe69ee 100644 --- a/fs/ext4/bitmap.c +++ b/fs/ext4/bitmap.c @@ -74,10 +74,7 @@ int ext4_block_bitmap_csum_verify(struct super_block *sb, } else calculated &= 0xFFFF; - if (provided == calculated) - return 1; - - return 0; + return provided == calculated; } void ext4_block_bitmap_csum_set(struct super_block *sb,