From patchwork Thu Sep 1 12:00:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12962355 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 41DC8ECAAD1 for ; Thu, 1 Sep 2022 12:01:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E9B98D0002; Thu, 1 Sep 2022 08:01:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 999A38D0001; Thu, 1 Sep 2022 08:01:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 888358D0002; Thu, 1 Sep 2022 08:01:06 -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 766BC8D0001 for ; Thu, 1 Sep 2022 08:01:06 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 47DA2C0F74 for ; Thu, 1 Sep 2022 12:01:06 +0000 (UTC) X-FDA: 79863375732.23.6F9C055 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf22.hostedemail.com (Postfix) with ESMTP id 68E05C0051 for ; Thu, 1 Sep 2022 12:01:05 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MJKKq2P0RzlWfm; Thu, 1 Sep 2022 19:57:35 +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; Thu, 1 Sep 2022 20:01:01 +0800 From: Miaohe Lin To: , , CC: , , Subject: [PATCH v2 00/10] A few cleanup patches for hugetlb Date: Thu, 1 Sep 2022 20:00:20 +0800 Message-ID: <20220901120030.63318-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: dggems706-chm.china.huawei.com (10.3.19.183) 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=1662033665; 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=EcHwZ0ZmjQ9B17RlRb9q+iW06f19Noh6XEd0gF5H6hA=; b=6EQWbr/1uFPaciOxous5uWky1Dszi/tRmEVN5YZUtAw7pogBfIQAlGxqVCHTlL5DFAJdmW O6sPaISLLhTl4Q1oXiqbtDqfbSBUtZNKYISu3t6kCuTll4TGZq0ijnx9GG9j+dMe47ifJc vLEFIIUPVL7T0oBj13AqSquq83Wsa7w= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; spf=pass (imf22.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=1662033665; a=rsa-sha256; cv=none; b=8Y/cGmyoZh0TiHHjuyhBQ4XArWduSy5YqmTf44JUKdVkePLrQHFmoNsINFddq5+U/2ImEe HRZ+O0Bp9EIhvSGSm/QInCEIUOe69/3RqfCPdLrcc+OtxRYaX+D6kcnjK3eIHgbhY+cBGw P2UKivXtT+PPXH2XhbNHBJDS0hu53fQ= Authentication-Results: imf22.hostedemail.com; dkim=none; spf=pass (imf22.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: k5pbe5zny1x5ddwbxjptitxizpnxoogz X-Rspamd-Queue-Id: 68E05C0051 X-Rspamd-Server: rspam05 X-HE-Tag: 1662033665-325454 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! --- v2: collect Reviewed-by tags per Muchun. Thanks! tweak the commit log in 3/10 change to add a comment for SetHPageVmemmapOptimized() in 8/10 make hugetlb depends on SYSFS || SYSCTL in 10/10 --- 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: add comment for subtle SetHPageVmemmapOptimized() hugetlb: remove meaningless BUG_ON(huge_pte_none()) hugetlb: make hugetlb depends on SYSFS or SYSCTL fs/Kconfig | 1 + include/linux/hugetlb.h | 4 --- mm/hugetlb.c | 55 +++++++++++++++++------------------------ 3 files changed, 24 insertions(+), 36 deletions(-)