ext4: remove useless conditional branch code
PATCH 1/1 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 <[email protected]>
--- fs/ext4/bitmap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
fs/ext4/bitmap.c +1 -4
@@ -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,
Signature · 1 line
2.20.1
Quoted 4 lines · wuchi
It's ok because the code will be optimized by the compiler, just try to simple the code.
Signed-off-by wuchi <[email protected]>
Sure. Feel free to add:
Reviewed-by Jan Kara <[email protected]>
Honza
Quoted 20 lines
fs/ext4/bitmap.c +1
-4@@ -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,Signature · 1 line
2.20.1
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 4 lines · wuchi
It's ok because the code will be optimized by the compiler, just try to simple the code.
Applied, thanks!
[1/1] ext4: remove useless conditional branch code
commit: 17809d3cf801374d7c23101800770ea34951f3c8
Best regards,
Signature · 1 line
Theodore Ts'o <[email protected]>