On 09/22/2020 08:30 AM, kernel test robot wrote:
From: kernel test robot <lkp@xxxxxxxxx>
drivers/md/raid10.c:1763:8-9: WARNING: return of 0/1 in function 'raid10_handle_discard' with return type bool
Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
Fixes: 8f694215ae4c ("md/raid10: improve raid10 discard request")
CC: Xiao Ni <xni@xxxxxxxxxx>
Signed-off-by: kernel test robot <lkp@xxxxxxxxx>
---
tree: git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git md-next
head: 5b2374a6c221f28c74913d208bb5376a7ee3bf70
commit: 8f694215ae4c7abf1e6c985803a1aad0db748d07 [15/16] md/raid10: improve raid10 discard request
raid10.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1760,7 +1760,7 @@ static bool raid10_handle_discard(struct
raid_end_bio_io(r10_bio);
}
- return 0;
+ return false;
Thanks for the patch. But it's not good to return false when
raid10_handle_discard handles discard bio
successfully. I'll send one patch to fix this problem.
Regards
Xiao