From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta1.migadu.com (out-141.mta1.migadu.com [95.215.58.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2AF045FFA2 for ; Tue, 18 Aug 2026 13:12:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787058737; cv=none; b=aOkf5rSorIVL6noH2YH2bXJ1bGhLHg9mpi4WULWHnpja7tzzyawBFFuc2nhXkBS5E5vFnG2MRQuRxFYBthQYNzXLLHISZQr+SdWqSDPwEjiVcziQHg+b+i8kQa4IPqYEiuUGQIK3w+BccXNus6gPwe5g9Nwmu/fhj6hkKNDBwFU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787058737; c=relaxed/simple; bh=z3Nuo7rdKfAlilt7Qu0TMklie3/gOO8sgolPIL27pOs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pklNnv2jcOc0gofcHXfXUKYZ4GC4X6OEiGe5AFSWApfBt3YnTjTRZa5LaYytktRVugaNSJo8QzNd/RWttHnkrBEXDtMEWA4TFSmgC4XhpxyeQhxsy953XxZfck2qf1xtz5S+Se471BKzeTj6z+D5p6CvEmdnsMI2YNpqYLhGteE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=AJwMRauu; arc=none smtp.client-ip=95.215.58.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="AJwMRauu" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=z3Nuo7rdKfAlilt7Qu0TMklie3/gOO8sgolPIL27pOs=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787058733; v=1; x=1787663533; b=AJwMRauuRm37dhI27xz8Gcs6xoET4jfC2mUjAq85bfG2PC1u/mcEQJxO9BIP5Q+gWFjkaxEW SvZaPlkmLsuxrZJpAcaF9D3qTAm2NFC1Xzl1Mnt76jkN1h3wpPk8zzvYDp7CFMpjNPoZSpbP75t SiEhzWq/sB6ZNXHlJaowWzV0= X-Envelope-To: linux-kernel@vger.kernel.org Received: from localhost (2a03:2880:10ff:c::) by mta10.migadu.com with ESMTPS id 0ff7917604fd4d10; Tue, 18 Aug 2026 13:12:12 +0000 X-Migadu-Flow: FLOW_OUT From: Usama Arif To: Andrew Morton , david@kernel.org, chrisl@kernel.org, kasong@tencent.com, ljs@kernel.org, ziy@nvidia.com, linux-mm@kvack.org Cc: ying.huang@linux.alibaba.com, Baoquan He , willy@infradead.org, youngjun.park@lge.com, hannes@cmpxchg.org, riel@surriel.com, shakeel.butt@linux.dev, alex@ghiti.fr, kas@kernel.org, baohua@kernel.org, dev.jain@arm.com, baolin.wang@linux.alibaba.com, Nico Pache , Liam R. Howlett , ryan.roberts@arm.com, Vlastimil Babka , lance.yang@linux.dev, linux-kernel@vger.kernel.org, nphamcs@gmail.com, shikemeng@huaweicloud.com, yosry@kernel.org, kernel-team@meta.com, Usama Arif Subject: [PATCH v6 01/12] mm: rename pmd_to_softleaf_folio() to pmd_softleaf_to_folio() Date: Tue, 18 Aug 2026 06:09:42 -0700 Message-ID: <20260818131202.494754-2-usama.arif@linux.dev> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260818131202.494754-1-usama.arif@linux.dev> References: <20260818131202.494754-1-usama.arif@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit pmd_to_softleaf_folio() converts the softleaf entry encoded by a PMD to a folio. Rename it to pmd_softleaf_to_folio() to make the conversion direction explicit and align it with softleaf_to_folio(). No functional change. Suggested-by: Dev Jain Signed-off-by: Usama Arif --- include/linux/leafops.h | 4 ++-- mm/huge_memory.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/leafops.h b/include/linux/leafops.h index 4c1476ae32343..7c13c58a5e218 100644 --- a/include/linux/leafops.h +++ b/include/linux/leafops.h @@ -657,7 +657,7 @@ static inline bool pmd_is_valid_softleaf(pmd_t pmd) } /** - * pmd_to_softleaf_folio() - Convert the PMD entry to a folio. + * pmd_softleaf_to_folio() - Convert the PMD softleaf entry to a folio. * @pmd: PMD entry. * * The PMD entry is expected to be a valid PMD softleaf entry. @@ -665,7 +665,7 @@ static inline bool pmd_is_valid_softleaf(pmd_t pmd) * Returns: the folio the softleaf entry references if this is a valid softleaf * entry, otherwise NULL. */ -static inline struct folio *pmd_to_softleaf_folio(pmd_t pmd) +static inline struct folio *pmd_softleaf_to_folio(pmd_t pmd) { const softleaf_t entry = softleaf_from_pmd(pmd); diff --git a/mm/huge_memory.c b/mm/huge_memory.c index ced400f72d43a..1b6b0aa2baa3b 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2467,7 +2467,7 @@ static struct folio *normal_or_softleaf_folio_pmd(struct vm_area_struct *vma, if (!thp_migration_supported()) WARN_ONCE(1, "Non present huge pmd without pmd migration enabled!"); - return pmd_to_softleaf_folio(pmdval); + return pmd_softleaf_to_folio(pmdval); } static bool has_deposited_pgtable(struct vm_area_struct *vma, pmd_t pmdval, -- 2.53.0-Meta