mm/hugetlb: move hugetlb_sysctl_init() to the __init section
authorMarc Herbert <Marc.Herbert@linux.intel.com>
Wed, 19 Mar 2025 06:00:30 +0000 (06:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:15:50 +0000 (10:15 +0200)
commit1fd89407d7cb5d26a4029caaa6543c1c502e2e18
treeae6fa2c6b6861ed88433b7e89d70b7cb8b6f2fcb
parent73d17d48df6cd78f1ee5d15932dd09a1a79b85fa
mm/hugetlb: move hugetlb_sysctl_init() to the __init section

commit 1ca77ff1837249701053a7fcbdedabc41f4ae67c upstream.

hugetlb_sysctl_init() is only invoked once by an __init function and is
merely a wrapper around another __init function so there is not reason to
keep it.

Fixes the following warning when toning down some GCC inline options:

 WARNING: modpost: vmlinux: section mismatch in reference:
   hugetlb_sysctl_init+0x1b (section: .text) ->
     __register_sysctl_init (section: .init.text)

Link: https://lkml.kernel.org/r/20250319060041.2737320-1-marc.herbert@linux.intel.com
Signed-off-by: Marc Herbert <Marc.Herbert@linux.intel.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Muchun Song <muchun.song@linux.dev>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/hugetlb.c