From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753201AbdJGOtb (ORCPT ); Sat, 7 Oct 2017 10:49:31 -0400 Received: from www17.your-server.de ([213.133.104.17]:48255 "EHLO www17.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752759AbdJGOt3 (ORCPT ); Sat, 7 Oct 2017 10:49:29 -0400 Subject: [PATCH] ceph: Fix bool initialization/comparison From: Thomas Meyer To: zyan@redhat.com, sage@redhat.com, idryomov@gmail.com, ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 X-Patch: Cocci Message-ID: <1507383097083-770412664-4-diffsplit-thomas@m3y3r.de> References: <1507383097081-778026979-0-diffsplit-thomas@m3y3r.de> In-Reply-To: <1507383097081-778026979-0-diffsplit-thomas@m3y3r.de> X-Serial-No: 4 Date: Sat, 07 Oct 2017 16:02:21 +0200 X-Mailer: Evolution 3.22.6-1 Content-Transfer-Encoding: 7bit X-Authenticated-Sender: thomas@m3y3r.de Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)