Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp300269ybb; Wed, 15 Apr 2020 01:31:54 -0700 (PDT) X-Google-Smtp-Source: APiQypK/svtym8q93UGIcMt69VJTGxLvziQd3DZnYoly3lwp+JhdUVAcBZVZvz5Du38j91r0u4NQ X-Received: by 2002:a17:906:cb92:: with SMTP id mf18mr4003350ejb.366.1586939514300; Wed, 15 Apr 2020 01:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586939514; cv=none; d=google.com; s=arc-20160816; b=zme6c9yiXVi36CW8KQSezJFe3MaXI2hPC4GTDGo0itJZEMDToHDBP+aHCNC+6JQ0yF 4WvbVMnWnONl4JrElrbbzYq7W+0XN27T1/m+0Oo2Y7hMgcOMPQQKHhvUrBCWMh/klgHT iJb6l1/LLhp4wFegQOOKchQ9du47nz7f12tcENioSBC12QtSA000xUBW7vvQ8iv82XN3 COiO8oqeZy5CgF8RbxK4b+gl8fdgGfzbdSyqxLPv7n4oeWHPuhWrAhMlNrx+Ma01HJX5 doE0qgG021iRrW6/0v4BgZV1NAq848QrizV4XuXuWJsBX4RZPlEACugQsjkfe90pFvOq UmPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=8TFQUQDeFy0WS4GpBIWKn8zIOmZxEI4SbIWx7r82iE8=; b=MyaCfkXyHoZjGKLx1VQGJkq+Jd1JfKx8vlZdM1AOU8hqyUSwTMYw6KS29ZtFJ0/lNp uJ4Hg5mNHHsdwTT3GQ2UZV6FYvO8vnAIPzILPKWO7VFjfqMR7Eg3iS5igcG9UZFYoBCW vzHBIx3GT/UBKrLlZKusJWdCX/5w3wEZ1+7Gpp6uwbkvhoBm4kd4caYk38jplfOw5KOj mMjYRIVrCnVUtGL3m+EsCYkyxCpXVDazY+JpUeBSBAC8t0zjZXVDbVoxFhgsykRZLVu8 wBtNyFsjBrpXjt/Ad7wY7MUHyAAM/kOFZFq9b42WvdYI1IzYmOBvu2+ceQrRF1B+Fas7 ahKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for 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 o5si9936303ejj.514.2020.04.15.01.31.30; Wed, 15 Apr 2020 01:31:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for 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: best guess record for 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 S2404869AbgDNDjW (ORCPT + 99 others); Mon, 13 Apr 2020 23:39:22 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2314 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404832AbgDNDjU (ORCPT ); Mon, 13 Apr 2020 23:39:20 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 96C7A3D5AC211402FCB5; Tue, 14 Apr 2020 11:39:15 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Tue, 14 Apr 2020 11:39:06 +0800 From: Zou Wei To: , , , , CC: Zou Wei Subject: [PATCH -next] mm: use false for bool variable Date: Tue, 14 Apr 2020 11:45:30 +0800 Message-ID: <1586835930-47076-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] 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: mm/zbud.c:246:1-20: WARNING: Assignment of 0/1 to bool variable mm/mremap.c:777:2-8: WARNING: Assignment of 0/1 to bool variable mm/huge_memory.c:525:9-10: WARNING: return of 0/1 in function 'is_transparent_hugepage' with return type bool Reported-by: Hulk Robot Signed-off-by: Zou Wei --- mm/huge_memory.c | 2 +- mm/mremap.c | 2 +- mm/zbud.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 6ecd104..5f42805 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -522,7 +522,7 @@ void prep_transhuge_page(struct page *page) bool is_transparent_hugepage(struct page *page) { if (!PageCompound(page)) - return 0; + return false; page = compound_head(page); return is_huge_zero_page(page) || diff --git a/mm/mremap.c b/mm/mremap.c index a7e282e..3ac7ced 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -774,7 +774,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len, out: if (offset_in_page(ret)) { vm_unacct_memory(charged); - locked = 0; + locked = false; } if (downgraded) up_read(¤t->mm->mmap_sem); diff --git a/mm/zbud.c b/mm/zbud.c index de5dd4d..bc93aa4 100644 --- a/mm/zbud.c +++ b/mm/zbud.c @@ -243,7 +243,7 @@ static struct zbud_header *init_zbud_page(struct page *page) zhdr->last_chunks = 0; INIT_LIST_HEAD(&zhdr->buddy); INIT_LIST_HEAD(&zhdr->lru); - zhdr->under_reclaim = 0; + zhdr->under_reclaim = false; return zhdr; } -- 2.6.2