Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp57511pxb; Mon, 7 Feb 2022 06:24:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbwZUK0lun7/TRHtiM+8nX5UMLPI6NEM4XU0Pc1XaoeTLGWbisvFsGTDAvuSgFXfVU2RbK X-Received: by 2002:a17:902:a603:: with SMTP id u3mr3720970plq.113.1644243844915; Mon, 07 Feb 2022 06:24:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644243844; cv=none; d=google.com; s=arc-20160816; b=HZobHXTG66jfW8uoRjoS+8OCY+sVimeg9uUrAXZUb65LlPFGsgSH+sw63a/Zcdp35O W+KavevmK3z2/X1sMCBxWQI3UGctz3ZCwBnT4i9I2A3uWvv2g0dwOFxCDc3CbPZyeREc uP7CgSKI2/2GEjEYSvgsHRcXpD9+tKqobDipbK2SQbapisDa70vtqlIfEQJt/jhy0NGs BgYOjwP6fw/mXp4wnlCEuoFYxPz/oN7WuYGi/yanf+HZA6I0DvHyh20AIZCBvYj/yt0T h/L4q9twmbONMHSXHQPdgfE2PD7Iw/vwJ0lCG5UMRre7d03RNcdHh1dZ0bLwq6uHohD3 Rpqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=MSwVp72SnO+lF6hll8Gq33pzbT9EfcZCTXlVIHovwjY=; b=Ff/aBNcLy2CeHy01Rqw0d089lypaDJmTa6NAZadlf0HwM/tQTvqXp+AmFhcOdM2dOr PmoU+P7wP9fIkKy91OQZxzOILHdMg19qXOwIC0JUeJDG3Z3oMbCMvXv+9r0Im52fDbvU hrK84R3AVJB1UUIifGA8c2p1M7KG1xgc5dahiBZrkx69xap8gf5GzTYI72hpMYmQiZ+c Whn10EWHsyiq5wiYb3Am6NK3h8q0tKMGjiQL0ZvrtgEqyR8rgL6mebwkAKNHGy+EzN3W DEkcy5kP0zhwleUzh0laeWmXdl9kkGEp4TkwRKLVcbRICJ48ojL6NRxFRu9hWDhRsnd1 ZqYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 8si9981741pfl.267.2022.02.07.06.23.53; Mon, 07 Feb 2022 06:24:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349101AbiBCDai (ORCPT + 99 others); Wed, 2 Feb 2022 22:30:38 -0500 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:50846 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231626AbiBCDah (ORCPT ); Wed, 2 Feb 2022 22:30:37 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0V3Tur6c_1643859034; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0V3Tur6c_1643859034) by smtp.aliyun-inc.com(127.0.0.1); Thu, 03 Feb 2022 11:30:35 +0800 From: Yang Li To: axboe@kernel.dk Cc: philipp.reisner@linbit.com, lars.ellenberg@linbit.com, drbd-dev@lists.linbit.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] mm/fs: fix boolreturn.cocci warning Date: Thu, 3 Feb 2022 11:30:33 +0800 Message-Id: <20220203033033.52214-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return statement in function returning bool should use true/false instead of 1/0. Eliminate the following coccicheck warning: ./drivers/block/drbd/drbd_req.c:912:9-10: WARNING: return of 0/1 in function 'remote_due_to_read_balancing' with return type bool Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/block/drbd/drbd_req.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 2e5fb7e442e3..c8448379bbcd 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c @@ -909,7 +909,7 @@ static bool remote_due_to_read_balancing(struct drbd_device *device, sector_t se switch (rbm) { case RB_CONGESTED_REMOTE: - return 0; + return false; case RB_LEAST_PENDING: return atomic_read(&device->local_cnt) > atomic_read(&device->ap_pending_cnt) + atomic_read(&device->rs_pending_cnt); -- 2.20.1.7.g153144c