From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753762AbdJIBwv (ORCPT ); Sun, 8 Oct 2017 21:52:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37940 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbdJIBwt (ORCPT ); Sun, 8 Oct 2017 21:52:49 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6A28F7E42C Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=zyan@redhat.com Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.0 \(3445.1.7\)) Subject: Re: [PATCH] ceph: Fix bool initialization/comparison From: "Yan, Zheng" In-Reply-To: <1507383097083-770412664-4-diffsplit-thomas@m3y3r.de> Date: Mon, 9 Oct 2017 09:52:40 +0800 Cc: Sage Weil , idryomov@gmail.com, ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: References: <1507383097081-778026979-0-diffsplit-thomas@m3y3r.de> <1507383097083-770412664-4-diffsplit-thomas@m3y3r.de> To: Thomas Meyer X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 09 Oct 2017 01:52:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 7 Oct 2017, at 22:02, Thomas Meyer wrote: > > Bool initializations should use true and false. Bool tests don't need > comparisons. > > Signed-off-by: Thomas Meyer > --- > > diff -u -p a/fs/ceph/caps.c b/fs/ceph/caps.c > --- a/fs/ceph/caps.c > +++ b/fs/ceph/caps.c > @@ -1711,7 +1711,7 @@ void ceph_check_caps(struct ceph_inode_i > > /* if we are unmounting, flush any unused caps immediately. */ > if (mdsc->stopping) > - is_delayed = 1; > + is_delayed = true; > > spin_lock(&ci->i_ceph_lock); > > @@ -3185,8 +3185,8 @@ static void handle_cap_flush_ack(struct > int dirty = le32_to_cpu(m->dirty); > int cleaned = 0; > bool drop = false; > - bool wake_ci = 0; > - bool wake_mdsc = 0; > + bool wake_ci = false; > + bool wake_mdsc = false; > > list_for_each_entry_safe(cf, tmp_cf, &ci->i_cap_flush_list, i_list) { > if (cf->tid == flush_tid) Applied, thanks Yan, Zheng