From: Marc Herbert Date: Wed, 19 Mar 2025 06:00:30 +0000 (+0000) Subject: mm/hugetlb: move hugetlb_sysctl_init() to the __init section X-Git-Tag: v6.13.12~82 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=bbaec591f62cfc9ebae0ee9e234f52242e535271;p=thirdparty%2Fkernel%2Fstable.git 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 Reviewed-by: Anshuman Khandual Reviewed-by: Muchun Song Cc: Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 6c7607d46f97c..70376020b9190 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4870,7 +4870,7 @@ static struct ctl_table hugetlb_table[] = { }, }; -static void hugetlb_sysctl_init(void) +static void __init hugetlb_sysctl_init(void) { register_sysctl_init("vm", hugetlb_table); }