From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 BF1404825B6; Thu, 10 Sep 2026 14:35:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789050902; cv=none; b=pi2pYcUvBRkpjgmw43rU79aA5Eo1zWoSBwwkdLzDDVJs7JWj4SxyFkgv3pANvxkeoDl6toq631BXcOkXjySEj0I0jbLwbuXTlU4qv1lDNDUC4LPnwTaXEsvI3arS7F2oQ7aIgVhI/zzmMha9KjCzhaIVjyIRG+YsTD4p/SnDRhY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789050902; c=relaxed/simple; bh=iCqvL3LCrudpSJq4LrDOiQWn9ZPQ06Yhhr7ab1Hg5kw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HKwkf3VFb/Thf59pTzMnxeG1CpHWF0rMn65NhphsPcWWrSzJIUFl+4HxVVWOtFmvN/VhOBfS5htyiQHlZMWgZEc1SmWVLwUTJwZOtYh3Jjw65AISGbZnN98guzN3Pw7BGcu4p7HsQuvzOo8Q3CKvWkw5TNoeeAz5P4+MLmcITYM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Oni/6koP; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Oni/6koP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 182601F00893; Thu, 10 Sep 2026 14:34:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789050900; bh=yqJhoyGyHJP6091fs8CPorGbMcEbisH8T+p5PtFRPtQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Oni/6koPplPswfXrbVStzvD8BZnPMK7/76eM+7w6wrqlEmb5xa12DEsFgxA/zTkgU loc/Pa8KbIYCVvhH0SrreuqsAooZJ+A0MmyWanzPVIvVJgoeL6/jxO59IH74sXO55n rYqC2aI1Z0DKoTcmeXrVFHdjTJTzOfJ3nNRTvBx9S51pnj7xHVpg2oUH4BRrAQmQBC +GcQcj7dKvvrvkMBVVmAp27Z6utx8cNPIGqNtPi9MNtz/UJiGVYPpDgMP0m9ijacUv CdI89qXab5ILhisHh4VfSpPjtWJa+u2ea+DkZZHl2CEuIR5NvbytiQ0c9k4+EZO7fN WJCFuP1DPybHA== Date: Thu, 10 Sep 2026 15:34:50 +0100 From: "Lorenzo Stoakes (ARM)" To: "David Hildenbrand (Arm)" Cc: Andrew Morton , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Kairui Song , Qi Zheng , Shakeel Butt , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Baoquan He , Baolin Wang , Brendan Jackman , Johannes Weiner , Zi Yan , Oscar Salvador , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Jan Kiszka , Kieran Bingham , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-cxl@vger.kernel.org, driver-core@lists.linux.dev, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 10/12] mm/sparse: remove flags parameter from sparse_init_one_section() Message-ID: References: <20260909-b4-sparsemem_cleanups-v1-0-008fc8d579fe@kernel.org> <20260909-b4-sparsemem_cleanups-v1-10-008fc8d579fe@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260909-b4-sparsemem_cleanups-v1-10-008fc8d579fe@kernel.org> On Wed, Sep 09, 2026 at 03:33:03PM +0200, David Hildenbrand (Arm) wrote: > Unused, let's remove it. Might be worth saying because of the changes ;) > > Signed-off-by: David Hildenbrand (Arm) But this is a nice change, always good to remove params/code if possible... :) Reviewed-by: Lorenzo Stoakes (ARM) > --- > mm/sparse-vmemmap.c | 2 +- > mm/sparse.c | 2 +- > mm/sparse.h | 5 ++--- > 3 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c > index 5aba058df6b67..25d3472972363 100644 > --- a/mm/sparse-vmemmap.c > +++ b/mm/sparse-vmemmap.c > @@ -894,7 +894,7 @@ int __meminit sparse_add_section(int nid, unsigned long start_pfn, > /* Align memmap to section boundary in the subsection case */ > if (section_nr_to_pfn(section_nr) != start_pfn) > memmap = pfn_to_page(section_nr_to_pfn(section_nr)); > - sparse_init_one_section(ms, section_nr, memmap, ms->usage, 0); > + sparse_init_one_section(ms, section_nr, memmap, ms->usage); > > return 0; > } > diff --git a/mm/sparse.c b/mm/sparse.c > index 344acaaed94db..d2e7c21319e27 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -245,7 +245,7 @@ static void __init sparse_metadata_init_nid(int nid, > memmap_boot_pages_add(section_nr_vmemmap_pages(pfn, PAGES_PER_SECTION, > NULL, NULL)); > sparse_init_one_section(__nr_to_section(section_nr), section_nr, > - mem_map, usage, 0); > + mem_map, usage); > usage = (void *)usage + mem_section_usage_size(); > } > } > diff --git a/mm/sparse.h b/mm/sparse.h > index 03351f2467e34..f45dd280db6ff 100644 > --- a/mm/sparse.h > +++ b/mm/sparse.h > @@ -91,7 +91,7 @@ int sparse_index_init(unsigned long section_nr, int nid); > > static inline void sparse_init_one_section(struct mem_section *ms, > unsigned long section_nr, struct page *mem_map, > - struct mem_section_usage *usage, unsigned long flags) > + struct mem_section_usage *usage) > { > unsigned long coded_mem_map; > > @@ -109,8 +109,7 @@ static inline void sparse_init_one_section(struct mem_section *ms, > VM_WARN_ON_ONCE(coded_mem_map & ~SECTION_MAP_MASK); > > ms->section_mem_map &= ~SECTION_MAP_MASK; > - ms->section_mem_map |= coded_mem_map; > - ms->section_mem_map |= flags | SECTION_HAS_MEM_MAP; > + ms->section_mem_map |= coded_mem_map | SECTION_HAS_MEM_MAP; > ms->usage = usage; > } > > > -- > 2.43.0 > -- Cheers, Lorenzo