Thread (3 messages) 3 messages, 2 authors, 2020-09-22

Re: [PATCH] md/raid10: fix boolreturn.cocci warnings

From: Xiao Ni <hidden>
Date: 2020-09-22 05:48:41
Also in: oe-kbuild-all


On 09/22/2020 08:30 AM, kernel test robot wrote:
quoted hunk ↗ jump to hunk
From: kernel test robot <redacted>

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 <redacted>
Signed-off-by: kernel test robot <redacted>
---

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help