From: Andrew Morton <akpm@linux-foundation.org>
To: Sang-Heon Jeon <ekffu200098@gmail.com>
Cc: David Hildenbrand <david@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
linux-mm@kvack.org, Lorenzo Stoakes <ljs@kernel.org>,
Michal Hocko <mhocko@suse.com>, Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Vlastimil Babka <vbabka@kernel.org>
Subject: Re: [PATCH] mm/sparse: correct init section annotations
Date: Fri, 31 Jul 2026 11:15:06 -0700 [thread overview]
Message-ID: <20260731111506.ed0bc4b98228e4a9e5bf283a@linux-foundation.org> (raw)
In-Reply-To: <20260731164758.1210668-1-ekffu200098@gmail.com>
On Sat, 1 Aug 2026 01:47:55 +0900 Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
> The !SPARSEMEM_EXTREME stub of sparse_index_init() has no annotation
> but the SPARSEMEM_EXTREME variant is __meminit. So mark the stub
> __meminit too.
>
> mminit_validate_memmodel_limits() is only called by memory_present(),
> which is __init. So mark it __init.
>
> sparse_usagebuf and sparse_usagebuf_end are only used by
> sparse_init_early_section(), sparse_usage_init() and sparse_usage_fini(),
> which are all __init. So mark them __initdata.
>
lgtm, thanks.
> --- a/mm/sparse.c
> +++ b/mm/sparse.c
> @@ -104,7 +104,7 @@ int __meminit sparse_index_init(unsigned long section_nr, int nid)
> return 0;
> }
> #else /* !SPARSEMEM_EXTREME */
> -int sparse_index_init(unsigned long section_nr, int nid)
> +int __meminit sparse_index_init(unsigned long section_nr, int nid)
> {
> return 0;
> }
We could make this
#ifndef CONFIG_SPARSEMEM_EXTREME
static inline int __meminit sparse_index_init(unsigned long section_nr, int nid)
{
return 0;
}
#endif
in a header and make it go away altogether.
next prev parent reply other threads:[~2026-07-31 18:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 16:47 [PATCH] mm/sparse: correct init section annotations Sang-Heon Jeon
2026-07-31 18:15 ` Andrew Morton [this message]
2026-07-31 19:42 ` David Hildenbrand (Arm)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260731111506.ed0bc4b98228e4a9e5bf283a@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=ekffu200098@gmail.com \
--cc=liam@infradead.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox