]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
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)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 1 Apr 2025 22:14:43 +0000 (15:14 -0700)
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>
mm/hugetlb.c

index 6fccfe6d046c6ce4d11df35345e79bd1b7d450d9..39f92aad7bd1e112a6a12e28f7108e0dd9dd5ce2 100644 (file)
@@ -5179,7 +5179,7 @@ static const struct ctl_table hugetlb_table[] = {
        },
 };
 
-static void hugetlb_sysctl_init(void)
+static void __init hugetlb_sysctl_init(void)
 {
        register_sysctl_init("vm", hugetlb_table);
 }