From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D19CB35202A; Wed, 17 Jun 2026 17:26:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.165.32 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781717206; cv=none; b=aG1chZuwHkevOIjaQsHaAdj1F5o5TxTSaQSzwOghB2mGUf69nNfNXj6gRO/w1u34eyouDeLz5USnzTvt8l9iyMs2H9MKBIztaB7lcS5NzTBZfovK5LAIX91aZ5ulkPKijGyFj1pMWgVV73gM8M1LIPcaD9JoNEkT7HJB98m+qTw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781717206; c=relaxed/simple; bh=eGWKu6ok+iG8t6txJrdCRJZxJsGr7fhxyNsECdEmbJw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=J/mMhEkgOf/gCNycFuzF0YUArQNmb0LQNpJ+1zrFZO7rCpyAfcA+b+6kwjdHtU+95cV/msMzbIPPKQfgH233pKAusBG9+Ml6DUwy4m71mQO2VrGUsqrYXVn4Ca+Y8cohuSIS9PMee/Ih4zZtuUQwqC1OuX5YKD4kJN3bMrgNLT4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=ZEmUIIVT; arc=none smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="ZEmUIIVT" Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65HEsKB22481211; Wed, 17 Jun 2026 17:26:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=corp-2025-04-25; bh=AADwJ EegnLaSovYbQ21oISFVKWqrD8KXOckyXaDfEOI=; b=ZEmUIIVT/S/GZgA7jY+hI EuwVglcwDgO3Z3gNfSvU/oaZoPPRRaKbWLqnFdObcuocmLXvRrvJYMMSEh/5ts4v ix4TVehP4ewZH7GnreIFVWyryBO9ubidmDSLA/MBD3FOoBpWZec9KWF1WbRD/7Fi NZXoPe3DTt//FTkDLtP+wv3en3eX21IxxZbE/SAJ/mrotYHE5jLsYUgt05WISY4d nFVJXhWO+D+ZkxiGk9Nk81BB1JdPcPITyi15Dh5d49sGu7zNKO7JZdgGoBxExtxf CRCRDg2DNSh1gjOVhC3aEBzc8MX2h7PucX9yLIPvrOunKx5HVElRpmK3EleW+62I w== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4eueg2hch8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Jun 2026 17:26:20 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.7/8.18.1.7) with ESMTP id 65HHNVP4003778; Wed, 17 Jun 2026 17:26:18 GMT Received: from brm-x62-16.us.oracle.com (brm-x62-16.us.oracle.com [10.80.150.37]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 4eudvc0wgy-10; Wed, 17 Jun 2026 17:26:18 +0000 (GMT) From: Jane Chu To: akpm@linux-foundation.org Cc: willy@infradead.org, jack@suse.cz, viro@zeniv.linux.org.uk, brauner@kernel.org, muchun.song@linux.dev, osalvador@suse.de, david@kernel.org, hughd@google.com, baolin.wang@linux.alibaba.com, linmiaohe@huawei.com, nao.horiguchi@gmail.com, lorenzo@kernel.org, rppt@kernel.org, peterx@redhat.com, corbet@lwn.net, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v2 09/11] hugetlb: remove the hugetlb_linear_page_index() helper Date: Wed, 17 Jun 2026 11:25:30 -0600 Message-ID: <20260617172534.1740152-10-jane.chu@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20260617172534.1740152-1-jane.chu@oracle.com> References: <20260617172534.1740152-1-jane.chu@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-17_02,2026-06-17_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2606150000 definitions=main-2606170167 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE3MDE2OCBTYWx0ZWRfX1YxMXz1sh4ji 3Xmx9wIW7m+FRpxr32JpNRN2sSCTr4KEd8D5RSRo2I26uuKZFrgPbG2kcP/UU0UXoCTX5tLwp+u yIQi0z+txBiJsfnSngGnnVD+AlWDHhKRWgPaRDliERXpbMAvEAuVQViQuYMDxkUtNGILT8afaJv m1j85294NvI+HvgLPhnlfavtJk/9crcafupPtuoAfDSuvdCoc2HYFvuhnxS1uBRcyB5f9rWgsy+ EABiJhGLisyBPyAEDbONV1EodH78xSmNMk+N8X38oWxzvOeBMHNs5KOQUJcfX0YnDPomM+ZvT1Y k1g3vV9Z+WMQap85ds0x0EvzWvTzwiu7BH9sJDVJg71KQH3CoU28zLq266PyDCLxtpPkLaFoKe2 0h7w76PLEHS1EEfPFSI7oWFnNdWj/vZ9DcrVZRRpFQZMxR/TJFBKJPRiy8scjiN4iHZJzTHRvVg UBgqkcNote9Thuu6UEmSt89fC/smvgvkdRF1Crz4= X-Proofpoint-GUID: LPAL_NDFZwyz429ZSGzojPt7Rvb_VSAr X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE3MDE2OCBTYWx0ZWRfX3qoKo5Cefkw5 SbMTTphCCkTl+lUxOl7aEUBIU89GtsYLpHGZVUuZAcyZXX1RmyU2ye5FWi8iT3hNHiHQAtpZXC9 d8UQ0afqYabqzzHQkq4sVuvfYCU2cSaXYdCW5J/5qZRNrlaVxCvu X-Proofpoint-ORIG-GUID: LPAL_NDFZwyz429ZSGzojPt7Rvb_VSAr X-Authority-Analysis: v=2.4 cv=UY1hjqSN c=1 sm=1 tr=0 ts=6a32d8bc b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=FelO9ux0wxsA:10 a=VkNPw1HP01LnGYTKEx00:22 a=jiCTI4zE5U7BLdzWsZGv:22 a=x0eKOSpe3m1H3M0S9YoZ:22 a=yPCof4ZbAAAA:8 a=lddk_7-pFbXPVCeMFioA:9 a=5yU3S35YU4bGjq-dph-N:22 a=Bho9c0fBagfJEIQBS7DQ:22 cc=ntf awl=host:12312 No one is calling hugetlb_linear_page_index(), so remove it. Signed-off-by: Jane Chu --- include/linux/hugetlb.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index e78d0f706681..e5a459a6e4b2 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -787,23 +787,6 @@ static inline unsigned huge_page_shift(struct hstate *h) return h->order + PAGE_SHIFT; } -/** - * hugetlb_linear_page_index() - linear_page_index() but in hugetlb - * page size granularity. - * @vma: the hugetlb VMA - * @address: the virtual address within the VMA - * - * Return: the page offset within the mapping in huge page units. - */ -static inline pgoff_t hugetlb_linear_page_index(struct vm_area_struct *vma, - unsigned long address) -{ - struct hstate *h = hstate_vma(vma); - - return ((address - vma->vm_start) >> huge_page_shift(h)) + - (vma->vm_pgoff >> huge_page_order(h)); -} - static inline bool order_is_gigantic(unsigned int order) { return order > MAX_PAGE_ORDER; -- 2.43.5