Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1580866pxk; Thu, 10 Sep 2020 21:02:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDRVZu/ko/FpqSRPbOLDbjOeUsu3B9vE7XG6ewhQcTQH2nMVLeej0YTIpa74C+hPk5mWnU X-Received: by 2002:aa7:db47:: with SMTP id n7mr9521edt.315.1599796926118; Thu, 10 Sep 2020 21:02:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599796926; cv=none; d=google.com; s=arc-20160816; b=wJSqY19aMamB8gfZY6EwadLUuDbKsyOFYCdAXgSpECqR3M2U1vO+XOtw/cNhxXROaG MHSBxmSCf+sbVEra1JrOYfLGAuDs1uokyvC7kZInAunSmuWCmdK98Y1fbDoq8KAgRW9q TUwr0Gu0DrOJrMm1G8/p7x3InFU6xwtMjleLzGdCFu2jKouafP8aiRnEBFoZ+PRAG23t eDeYmdsfboMYiJSbdlfnMcQc3rUdm60q7fcHH/B9smdc8OKwPMem0sdES+jO6C4MgDCv 3yr0Bl7YNqvDNm6VM8EC3ZMUgY8/v7DCbIuGVGny6QQqXNg1mGJmZ+KvguWsbB2T5wJY ogdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ce0o5+bGX2/zy87MB+wZCPQ1r6FUQRMLmSu+IJY6o2g=; b=qZBdinKGPP8cMUShxYhoI1kZzyVeey8LNynSc9uv2EOWk/uA3DMfmnf28wqP0uLPEp TQs0c1spz019OlsEJlfvp2VRzoldV5sUfGyZ+1qTJ9yp5zejnToxswb5LBWyA8az3F4C hIEp7hVGJaJAGa5CdNgWj/AdcLkb5qRCaBmlsQn7jQNokOZdOjjSURAakiembCoNLcsJ XuS7SBLD/5g6maUhRvsxbL4/Xh7dZLpW1GFj3lEey5WCdz/LoYHEUX1H/q+8zbKV4lTf m0NBe26uxcoawvkd+S0C+AJspx7tal75M3vgpQTc7ecNVYFKMuTcZsbVDK+2HT/oLoUO ikzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z1si480829ejd.673.2020.09.10.21.01.43; Thu, 10 Sep 2020 21:02:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725788AbgIKD66 (ORCPT + 99 others); Thu, 10 Sep 2020 23:58:58 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:59474 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725283AbgIKD64 (ORCPT ); Thu, 10 Sep 2020 23:58:56 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 60F004CED601D85B6576; Fri, 11 Sep 2020 11:58:54 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Fri, 11 Sep 2020 11:58:46 +0800 From: Zheng Bin To: , , , CC: , Subject: [PATCH -next 4/5] cifs: fix comparison to bool warning in connect.c Date: Fri, 11 Sep 2020 12:05:38 +0800 Message-ID: <20200911040539.113307-5-zhengbin13@huawei.com> X-Mailer: git-send-email 2.26.0.106.g9fadedd In-Reply-To: <20200911040539.113307-1-zhengbin13@huawei.com> References: <20200911040539.113307-1-zhengbin13@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes coccicheck warning: fs/cifs/connect.c:2478:5-16: WARNING: Comparison to bool fs/cifs/connect.c:3560:10-35: WARNING: Comparison to bool fs/cifs/connect.c:4297:6-21: WARNING: Comparison to bool Signed-off-by: Zheng Bin --- fs/cifs/connect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index a5731dd6e656..4d2651b9f019 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2475,7 +2475,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, else if (override_gid == 1) pr_notice("ignoring forcegid mount option specified with no gid= option\n"); - if (got_version == false) + if (!got_version) pr_warn_once("No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3.1.1), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3.1.1 (or even SMB3 or SMB2.1) specify vers=1.0 on mount.\n"); kfree(mountdata_copy); @@ -3557,7 +3557,7 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info) } } else if ((tcon->capabilities & SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY) && (ses->server->capabilities & SMB2_GLOBAL_CAP_PERSISTENT_HANDLES) - && (volume_info->nopersistent == false)) { + && !volume_info->nopersistent) { cifs_dbg(FYI, "enabling persistent handles\n"); tcon->use_persistent = true; } else if (volume_info->resilient) { @@ -4294,7 +4294,7 @@ static int mount_get_conns(struct smb_vol *vol, struct cifs_sb_info *cifs_sb, *nses = ses; - if ((vol->persistent == true) && (!(ses->server->capabilities & + if (vol->persistent && (!(ses->server->capabilities & SMB2_GLOBAL_CAP_PERSISTENT_HANDLES))) { cifs_server_dbg(VFS, "persistent handles not supported by server\n"); return -EOPNOTSUPP; -- 2.26.0.106.g9fadedd