From patchwork Mon Aug 29 09:57:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Shixin X-Patchwork-Id: 12957587 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 6A4D0ECAAD4 for ; Mon, 29 Aug 2022 09:22:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 97561940008; Mon, 29 Aug 2022 05:22:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D6E5940007; Mon, 29 Aug 2022 05:22:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 777FF940008; Mon, 29 Aug 2022 05:22:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 63907940007 for ; Mon, 29 Aug 2022 05:22:44 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2D06A8093E for ; Mon, 29 Aug 2022 09:22:44 +0000 (UTC) X-FDA: 79852090248.22.215691C Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf31.hostedemail.com (Postfix) with ESMTP id 01F4420037 for ; Mon, 29 Aug 2022 09:22:42 +0000 (UTC) Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MGPyY6cyDzlWZn; Mon, 29 Aug 2022 17:19:17 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 29 Aug 2022 17:22:39 +0800 Received: from huawei.com (10.175.113.32) by dggpemm100009.china.huawei.com (7.185.36.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 29 Aug 2022 17:22:39 +0800 From: Liu Shixin To: Andrew Morton , Hugh Dickins , Kefeng Wang CC: , , Liu Shixin Subject: [PATCH] mm/thp: simplify has_transparent_hugepage by using IS_BUILTIN Date: Mon, 29 Aug 2022 17:57:09 +0800 Message-ID: <20220829095709.3287462-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm100009.china.huawei.com (7.185.36.113) X-CFilter-Loop: Reflected ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=none; spf=pass (imf31.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=liushixin2@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661764963; a=rsa-sha256; cv=none; b=W1x3KhxQ5EvjBEuvyRk2ZtQ4Jtkkj9oafc6661iAQ3dycxyqFIIwrPGgz0UcnPb8wpwXg1 +OPQztm9LKQdGUtPr0SDmWhBHXOxJpE2bNPz5b9aUU8BbKeUD59hhmS69P+O6CJ1jtajDp hNqshnI4TbFLnC5iV6gehBvp17pSDds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661764963; 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=0TNwtcAgi/b5ZvvdZ9cZZcy+LA4paYQYjGEsMFpe0vU=; b=khzFYqZBJw+r5220138EdHa1xMmAWJQxNcCUDm/mpt4TPgaHiwB6kvkJK9wI4SDvEWMwNX TF9i7YueZ1kfgBv3jULPU8nS+Vrx1YK+WNdey6m2RT6qoQ7Utz6JdtBkKUOKC7C3AWLnGL Wpn+nN/1qb+XfXXXEIUG0PtmwqUMsPI= Authentication-Results: imf31.hostedemail.com; dkim=none; spf=pass (imf31.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=liushixin2@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspam-User: X-Stat-Signature: b5ji31ep3tygk7ikbxyqdh4szuk4k5ra X-Rspamd-Queue-Id: 01F4420037 X-Rspamd-Server: rspam12 X-HE-Tag: 1661764962-876571 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: Simplify code of has_transparent_hugepage define by using IS_BUILTIN. No functional change. Signed-off-by: Liu Shixin Reviewed-by: David Hildenbrand --- include/linux/pgtable.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 73fb1b2af795..a108b60a6962 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -1610,11 +1610,7 @@ typedef unsigned int pgtbl_mod_mask; #endif #ifndef has_transparent_hugepage -#ifdef CONFIG_TRANSPARENT_HUGEPAGE -#define has_transparent_hugepage() 1 -#else -#define has_transparent_hugepage() 0 -#endif +#define has_transparent_hugepage() IS_BUILTIN(CONFIG_TRANSPARENT_HUGEPAGE) #endif /*