From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,NICE_REPLY_A,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63E93C4363D for ; Tue, 22 Sep 2020 05:48:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A95D23A9B for ; Tue, 22 Sep 2020 05:48:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YEymxIGs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728941AbgIVFsk (ORCPT ); Tue, 22 Sep 2020 01:48:40 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:52658 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726193AbgIVFsk (ORCPT ); Tue, 22 Sep 2020 01:48:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600753718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bdAfVOZvxFFgR7l8ht3Q9Fg9KxKXlbe/wWD/m8+NrCs=; b=YEymxIGs9xyEUNbLI7T9HEbuxlvsuP744oWsDAlHDAcEUm3RqazpdQQWP6bklmOee88JhC JFxETNA7OgRCzC4CH8EtsQcJepqSquTkApMvbj08jlE4aoBMQ86kIqraIX6u+HG0VPpyiA +ozNlEFHsWEFOpn9+KaRuzroSG8MN7Y= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-334-cfWOQeUIOJG38KEFquBAYw-1; Tue, 22 Sep 2020 01:48:35 -0400 X-MC-Unique: cfWOQeUIOJG38KEFquBAYw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7342857060; Tue, 22 Sep 2020 05:48:33 +0000 (UTC) Received: from localhost.localdomain (ovpn-8-27.pek2.redhat.com [10.72.8.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id A209755783; Tue, 22 Sep 2020 05:48:30 +0000 (UTC) Subject: Re: [PATCH] md/raid10: fix boolreturn.cocci warnings To: kernel test robot Cc: kbuild-all@lists.01.org, linux-raid@vger.kernel.org, Song Liu , Coly Li , Guoqing Jiang References: <202009220853.dnMV3qcl%lkp@intel.com> <20200922003044.GA8898@8d4990752b6e> From: Xiao Ni Message-ID: <3905a053-626d-35e5-fc3e-e8b3e22455e0@redhat.com> Date: Tue, 22 Sep 2020 13:48:28 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20200922003044.GA8898@8d4990752b6e> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-raid@vger.kernel.org On 09/22/2020 08:30 AM, kernel test robot wrote: > From: kernel test robot > > 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 > Signed-off-by: kernel test robot > --- > > 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