From patchwork Fri Aug 26 09:24:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12955709 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 E9A16ECAAA3 for ; Fri, 26 Aug 2022 09:25:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2B3026B0080; Fri, 26 Aug 2022 05:24:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 14B216B0081; Fri, 26 Aug 2022 05:24:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E91EC6B007D; Fri, 26 Aug 2022 05:24:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id A7A656B007E for ; Fri, 26 Aug 2022 05:24:56 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 80720140447 for ; Fri, 26 Aug 2022 09:24:56 +0000 (UTC) X-FDA: 79841209392.19.AB74908 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf07.hostedemail.com (Postfix) with ESMTP id 0D14640006 for ; Fri, 26 Aug 2022 09:24:54 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MDZ8Z1yWpzlWS7; Fri, 26 Aug 2022 17:21:34 +0800 (CST) Received: from huawei.com (10.175.124.27) 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.2375.24; Fri, 26 Aug 2022 17:24:51 +0800 From: Miaohe Lin To: , , CC: , , Subject: [PATCH 00/10] A few cleanup patches for hugetlb Date: Fri, 26 Aug 2022 17:24:12 +0800 Message-ID: <20220826092422.39591-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661505896; 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=J/Se7EIdoct3N2sDjvv+C3nnIBncgMpxj9HT+BKT7gg=; b=Kck56C22ApUKe6NrP8rXO1LbWn7q37wC3O6brgRG7u4Xo4oGsg80Ubl5rwE7Q4SlGGJyUg Eu2tf5G6WhTI2u4spej4KOs1CixlkwJzHYOG2MxrmdB8XqrO1eJaXbZcKT8uipbbD92yJq aa7G5b1cKLGJ7ivJMXOCPpXFUmVqwBQ= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; spf=pass (imf07.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 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=1661505896; a=rsa-sha256; cv=none; b=1/CxDi7BawdWw7pn63hbYTo6Q5NBGJpXdfpXANP3NGXMz/35gH85kizYcQvA/YU80v7VuY qWKZqx3Fho7j80ID8UetjSZFnwTToBT8jTyMIPUI0u87oCTkmE06udrRluksFutmJO+j2m gD2GPq3SfF2NJ9iqj/11c1qQe017LoY= Authentication-Results: imf07.hostedemail.com; dkim=none; spf=pass (imf07.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspam-User: X-Stat-Signature: 3nstd5965hntpnn4yocgjf39muhx3w1x X-Rspamd-Queue-Id: 0D14640006 X-Rspamd-Server: rspam03 X-HE-Tag: 1661505894-642769 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: Hi everyone, This series contains a few cleanup patches to use helper functions to simplify the codes, remove unneeded nid parameter and so on. More details can be found in the respective changelogs. Thanks! Miaohe Lin (10): hugetlb: make hugetlb_cma_check() static hugetlb: Use helper macro SZ_1K hugetlb: Use LIST_HEAD() to define a list head hugetlb: Use sizeof() to get the array size hugetlb: Use helper {huge_pte|pmd}_lock() hugetlb: pass NULL to kobj_to_hstate() if nid is unused hugetlb: kill hugetlbfs_pagecache_page() hugetlb: remove unneeded SetHPageVmemmapOptimized() hugetlb: remove meaningless BUG_ON(huge_pte_none()) hugetlb: make hugetlb selects SYSFS if !SYSCTL fs/Kconfig | 1 + include/linux/hugetlb.h | 4 ---- mm/hugetlb.c | 52 +++++++++++++++-------------------------- 3 files changed, 20 insertions(+), 37 deletions(-)