From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sg-1-102.ptr.blmpb.com (sg-1-102.ptr.blmpb.com [118.26.132.102]) (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 A6C8719B5A3 for ; Thu, 27 Nov 2025 12:14:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=118.26.132.102 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764245676; cv=none; b=cpxbQ2tRqqETGQ0vYv9ZZj+tTkLKYp1So7EH4a5q1AEuYmjffPIAb0eoENm6c1BjLAaFS7P1PjDbdU3eIQJRabjsHvIO4jUJ2mK1FnQnbgNzSRJXkljnizPd1az1bjI54Rjy2PdVCyu5MdOMPwN13Eg0BI39MuP+OqEUJh/r7CU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764245676; c=relaxed/simple; bh=kiw1d+MBw6DatsLJ5A+2d4CoZwateuKa8UNBfR3/oNs=; h=From:Content-Type:Subject:References:To:Cc:Date:In-Reply-To: Message-Id:Mime-Version; b=A3cI7OwlP4noXZz5ZWoLwFHlW20JMDGTq8b+wnx0CGZ9V0b9e0SMfbw8eSJv2hMas+pEwmO2rghIJg/ccuDzK61Haj7shD7NrHFzUR3Hu2ConZLDWm6raLaHhOQ6a8znnGPZW+nQ71XQU9MGEjLEtWZgHZYPPxOC1O0KhD27QSs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=OYTUW7d/; arc=none smtp.client-ip=118.26.132.102 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="OYTUW7d/" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1764245667; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=CHPGookPXFYQULpo2LQ06D8jqiRXCuxCUU9K/zATqvo=; b=OYTUW7d/CWTTySWM9mPvubnfAEC19vmk4jZNg+734tkRDqV+4SrNn1mF3Lyui/G+pFgvY6 GJK9jYTuXXYY8YfczN+hsJNQNLmgtyEio37D/SMYTwdOhOd8ku8l/KfeqAzASoRvmc0ywQ zxEVlH+BjdpV8v8+i0TxsHKgTYx4j3ZljAm1qnMjUmIfyDUWv5aC3b9eIZD8Q3ckE5ly8U sshgZnZot+rIc+ldBkB/93P+K9IZC8X/I1l9cDqj9cjmAsWD4kozk8r6l1Jg0b7zZQPm1u R0U+ogWUFujgyls728Cfug0CabII9KOR+e6Q4CpMLIQEC9SOnpmaiM6qSLRL9A== From: "Jinhui Guo" X-Original-From: Jinhui Guo Content-Type: text/plain; charset=UTF-8 X-Lms-Return-Path: Subject: Re: [PATCH] mm/sparse: Fix sparse_vmemmap_init_nid_early definition without CONFIG_SPARSEMEM Content-Transfer-Encoding: quoted-printable References: <3cdc6bd6-f0c4-410f-b2a2-8cc2b5d1c522@kernel.org> X-Mailer: git-send-email 2.17.1 To: Cc: , , , , , , , , , Date: Thu, 27 Nov 2025 20:14:10 +0800 In-Reply-To: <3cdc6bd6-f0c4-410f-b2a2-8cc2b5d1c522@kernel.org> Message-Id: <20251127121410.357-1-guojinhui.liam@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Hi, David On Thu, Nov 27, 2025 at 10:46:54AM +0100, David Hildenbrand (Red Hat) wrote= : > On 11/27/25 10:25, Jinhui Guo wrote: > > When CONFIG_SPARSEMEM is disabled, the macro > > sparse_vmemmap_init_nid_early(_nid, _use) passes > > two arguments, while the actual function accepts > > only nid. Drop the extra argument _use. > >=20 > > Fixes: d65917c42373 ("mm/sparse: allow for alternate vmemmap section in= it at boot") > > Signed-off-by: Jinhui Guo > > --- > > include/linux/mmzone.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > > index 7fb7331c5725..f6dd181a4821 100644 > > --- a/include/linux/mmzone.h > > +++ b/include/linux/mmzone.h > > @@ -2293,7 +2293,7 @@ void sparse_init(void); > > #else > > #define sparse_init() do {} while (0) > > #define sparse_index_init(_sec, _nid) do {} while (0) > > -#define sparse_vmemmap_init_nid_early(_nid, _use) do {} while (0) > > +#define sparse_vmemmap_init_nid_early(_nid) do {} while (0) > > #define sparse_vmemmap_init_nid_late(_nid) do {} while (0) > > #define pfn_in_present_section pfn_valid > > #define subsection_map_init(_pfn, _nr_pages) do {} while (0) >=20 > That commit is from early 2025. >=20 > So what are the symptoms we are fixing? I would have assumed a compile-ti= me > problem, but no built bot caught that? I spotted the issue while porting the patches. It=E2=80=99s harmless. Both sparse_index_init() and sparse_vmemmap_init_nid_early() are only referenced in mm/sparse.c and mm/sparse-vmemmap.c. So they can simply be deleted from include/linux/mmzone.h when CONFIG_SPARSEMEM is disabled. > --=20 > Cheers > David -- Best regards, Jinhui