From patchwork Sat Jun 10 03:41:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 13274713 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82DF3C7EE29 for ; Sat, 10 Jun 2023 03:41:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8A2666B0074; Fri, 9 Jun 2023 23:41:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 853336B0075; Fri, 9 Jun 2023 23:41:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 741E18E0002; Fri, 9 Jun 2023 23:41:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 619FD6B0074 for ; Fri, 9 Jun 2023 23:41:44 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 4EB9A1A0211 for ; Sat, 10 Jun 2023 03:41:43 +0000 (UTC) X-FDA: 80885438886.13.6880EFA Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf14.hostedemail.com (Postfix) with ESMTP id 51D09100006 for ; Sat, 10 Jun 2023 03:41:37 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686368500; a=rsa-sha256; cv=none; b=HTh//iQTw6IjFQPGmmJ3Eoy2si+8spUn7S9PJvK6JLQNmYCRXaZyUPP/ofAUKfjmk14RyY AqbWpOSZh8Ju3qod7xPZGS0jfaM4jaqaGSK+NkpylFCb33rZeZRwuZnqzO3z327TnOgWiQ AojAlgQIFj3Kx09xdu8NPJVL/8PDLzY= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686368500; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=0WC5eJf881lg5xWp2hVCMycy1Gd6UhhBlGV+Btx3tQo=; b=oRM9nT7FW6z+YxByooLMjqGU5dogHD5J72sdhogX7kWYzAYFWYBXMv9R2+M902RvjezuVG tzNk4aCr247s/LMB9pKFl0vc0KZnGUQweujC3tWLA8ruiL4R/1huMvQLbxDQ5eBw9VL42N opIHFTIvlH7YdnmekcEoo0Dr3L0j5EI= Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QdNxF5lsczLmlc; Sat, 10 Jun 2023 11:39:45 +0800 (CST) Received: from huawei.com (10.175.104.170) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sat, 10 Jun 2023 11:41:31 +0800 From: Miaohe Lin To: CC: , , Subject: [PATCH] memory tier: remove unneeded !IS_ENABLED(CONFIG_MIGRATION) check Date: Sat, 10 Jun 2023 11:41:14 +0800 Message-ID: <20230610034114.981861-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Originating-IP: [10.175.104.170] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 51D09100006 X-Stat-Signature: kkgq6u3g8ho3c9iffuoxsicz39t3r16k X-HE-Tag: 1686368497-942791 X-HE-Meta: U2FsdGVkX19iVFYhnKJzZu+94dPmhqgYEOC8DafDr1WQ53wErMv4i/VmC7kz5VnS4lFnPTzcXmW8VlOQqgaSNaMdrSM61rKHwIvW/HdF+3fo+i8zmJKZIWI/wQvsNAn7xWdEfyFmf5AxxlAhYRtlqWDmXNglc0rxWwBNi43z7/l1be/wpZ1WrA47no2NFclllko7jxuwGXi54eoe1kdqy5M4CqnzDKwGNYuWth6UlGrwST425lJ14uRKgf7AHjfoy88N3pC5Mxbh5UswlO+Lhv4SCoOqSP7PxGi6sDRKlT5yrbNpC5xsxALD5HpHfGqcoEc6taMl3Qx+IW886URfUJ8HVtzJU/qhxw6Ugkzsm09D5X6nUx+SPptY5zw5QUFmNmMrDA27zGi89vpCHp5wAcUMlbIzOPTBcEagTwLioLB1WJ/FXn7owoO8u62HCatUPrtDdYYM5gIKtNCyBiNAZMwSF5oPDuaAdE5bqK6s+3sDVSFA5/QCVgmdtacQTVB9ORMua/yGcYTWfFEajutOwADOcJmCa09vdrqr+11il0vNMJon+VHvKB9N38pEI9swx4FVOTIpQdUWFiLuM/B/tFlFzJpH+z11DfNz1jx75hUhR7Gjy+Ohhuw81eE5xQg9tOsWOmfTch8k+8YzWZ09TbHRrLdoCzRW/mcc8jtj+0xGt4wDr4ThpyG6NZDDE9mOeF5ct3UtINDYNv4BBK6POEOc0/q8imETliXIlWz/r/7BamYq5yQjNcxiOZOnktPnFqJvOQW5EQikVVKhxj70DqgyOQ7K72gNqTaoKUGgGxzoKfGXWNXSVyXsf3EH++yUV0hG0zLyRGFBQRYlF46e2JHT9xkPmlXE7ifuDgkHAMOmSkUnTiBj03Fhf3AAxWP0uNccZxaCvksZx93edPDMbxjZlZ+3MxCidcMIya+LIW7zlU8usCD6bKMCWZExsCp27m/3J7Spz8L0CGG00RG rvoWFxKy FFOVzEOw6GCgn2ggljsTgYUvnRqmU4k6dPhvWuIKAfxPDV2Jrm9cbC9uW3zhV5b2TUjr712f+1BbNnNZM4MK730W1Iiy7yU9DsEIiwS2gSpDg7f746X0jGI5PHuBNXdU7E/JzjsJZTnoMjv6CN/yF/oVgGJLJfOSvPSlbEj6PbQFmt9Y9A5QgbDtrMuVCXg+r1V4AA6laskc7nezwp8Q4HPqjYytXDybZRRXpE92dysu09gs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: establish_demotion_targets() is defined while CONFIG_MIGRATION is enabled. There's no need to check it again. Signed-off-by: Miaohe Lin Reviewed-by: David Hildenbrand Reviewed-by: Yang Shi --- mm/memory-tiers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c index dd04f0ce5277..a516e303e304 100644 --- a/mm/memory-tiers.c +++ b/mm/memory-tiers.c @@ -366,7 +366,7 @@ static void establish_demotion_targets(void) lockdep_assert_held_once(&memory_tier_lock); - if (!node_demotion || !IS_ENABLED(CONFIG_MIGRATION)) + if (!node_demotion) return; disable_all_demotion_targets();