Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2922664rwe; Mon, 29 Aug 2022 02:44:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR5LyOtHu0O9RsyHgCyjkP313ds1SW18+LooCq2AmHW8jglca3JZ4FidYZqjuV5UV9ENuNEW X-Received: by 2002:a17:902:be02:b0:172:d409:e057 with SMTP id r2-20020a170902be0200b00172d409e057mr15738148pls.90.1661766260393; Mon, 29 Aug 2022 02:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661766260; cv=none; d=google.com; s=arc-20160816; b=tJL33NHhnr2XFkz1J36K/mWWwYjuFPY7qolSP/RPxCZX38XFt/OtBGpuyigalt8knl CaG7A7ezmEn0dfFV1KWMBQZfHqt+fyzih7ZLuDnbTnBqDNmPcBIH04n+h/Dw74JuRbYC 59ycp/V9zh0QLTyE9EUbIGSEveFdiKYXm7JyJ1FV3GyiO29iinZhxwQu+WikZa594yGE x6KO5MQqPya4HXgK/IWHodd3PLKQBauLiTKLou5EW80MG77o8AJBRa1yU+BHkHltqnYF ZWSFuSlmw1icJ4UtR5CAKuHijvNzCn624MVFlK0FtfC4YbpWIBHw6IlWu0O+QawunF4t fiww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=0TNwtcAgi/b5ZvvdZ9cZZcy+LA4paYQYjGEsMFpe0vU=; b=d8ikmr7uFMOGGo9VZVEEHojiXNIFdV9OTRNkFsut1yOo1rMtjq0jS462Pan63r7fHu GN61H/XYh35tWVHB5RNbzUR+l38FqlmpDv4xhMRkDvQ3W6MTjEYUiUEJ5v8S0F6rpHKo KA9+/DemoV9TWbJE8ok5+GiQ6ynidbI8zaIEXyt4rbPEacVHPLyy18yCo09LHRbPd8tT Gt9t8m1vTizQc3O8QLqsDQIjFsDUow7+3P8GDgkJhNgMxCd9wmPwxcut4f5D9t2+Xp17 O+CoR3OM+uFmGYB5VYbpzQP4ghGNqubkT7ZYjX0kB92LVj54xbTEFlFX5/LGspKnzbbY VwqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a170902e88500b00172e4762e4csi9704038plg.370.2022.08.29.02.44.09; Mon, 29 Aug 2022 02:44:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229834AbiH2JWs (ORCPT + 99 others); Mon, 29 Aug 2022 05:22:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbiH2JWo (ORCPT ); Mon, 29 Aug 2022 05:22:44 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 426BA5AC5C for ; Mon, 29 Aug 2022 02:22:42 -0700 (PDT) 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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify code of has_transparent_hugepage define by using IS_BUILTIN. No functional change. Signed-off-by: Liu Shixin --- 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 /* -- 2.25.1