From patchwork Mon Mar 1 12:57:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12109625 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02130C433E0 for ; Mon, 1 Mar 2021 12:57:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7AE8E64E2E for ; Mon, 1 Mar 2021 12:57:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AE8E64E2E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vivo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 10B538D006A; Mon, 1 Mar 2021 07:57:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0BCBA8D0063; Mon, 1 Mar 2021 07:57:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3A798D006A; Mon, 1 Mar 2021 07:57:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0218.hostedemail.com [216.40.44.218]) by kanga.kvack.org (Postfix) with ESMTP id DD6A88D0063 for ; Mon, 1 Mar 2021 07:57:12 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 91EF0824999B for ; Mon, 1 Mar 2021 12:57:12 +0000 (UTC) X-FDA: 77871305904.20.6B9F943 Received: from mail-m121143.qiye.163.com (mail-m121143.qiye.163.com [115.236.121.143]) by imf19.hostedemail.com (Postfix) with SMTP id 17DF090009E2 for ; Mon, 1 Mar 2021 12:57:05 +0000 (UTC) Received: from vivo-HP-ProDesk-680-G4-PCI-MT.vivo.xyz (unknown [58.251.74.231]) by mail-m121143.qiye.163.com (Hmail) with ESMTPA id 79CF05400F8; Mon, 1 Mar 2021 20:57:08 +0800 (CST) From: Wang Qing To: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Wang Qing Subject: [PATCH] mm: delete bool "migrated" Date: Mon, 1 Mar 2021 20:57:01 +0800 Message-Id: <1614603421-2681-1-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZSUIfTk9MHRpOSRlPVkpNSk9NS0hPSUNMSk5VEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS0hNSlVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Nww6Shw6ED8cFxA9NFYNSwsh EDRPCihVSlVKTUpPTUtIT0lCS0JLVTMWGhIXVQwaFRwKEhUcOw0SDRRVGBQWRVlXWRILWUFZTkNV SU5KVUxPVUlISllXWQgBWUFKTkxONwY+ X-HM-Tid: 0a77eddd2319b038kuuu79cf05400f8 X-Stat-Signature: t33m71n5wedeca8xzi3muzwsxbf44rsi X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 17DF090009E2 Received-SPF: none (vivo.com>: No applicable sender policy available) receiver=imf19; identity=mailfrom; envelope-from=""; helo=mail-m121143.qiye.163.com; client-ip=115.236.121.143 X-HE-DKIM-Result: none/none X-HE-Tag: 1614603425-629714 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Smatch gives the warning: do_numa_page() warn: assigning (-11) to unsigned variable 'migrated' Signed-off-by: Wang Qing --- mm/memory.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 784249f..d8125df --- a/mm/memory.c +++ b/mm/memory.c @@ -4102,7 +4102,6 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf) int page_nid = NUMA_NO_NODE; int last_cpupid; int target_nid; - bool migrated = false; pte_t pte, old_pte; bool was_writable = pte_savedwrite(vmf->orig_pte); int flags = 0; @@ -4172,8 +4171,7 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf) } /* Migrate to the requested node */ - migrated = migrate_misplaced_page(page, vma, target_nid); - if (migrated) { + if (migrate_misplaced_page(page, vma, target_nid)) { page_nid = target_nid; flags |= TNF_MIGRATED; } else