Skip to contentSkip to conversation

mm: hugetlb_vmemmap: include missing linux/moduleparam.h

PATCH In review Vasily Gorbik 3 participants 4 messages Nov 2, 2022 – Nov 4, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: hugetlb_vmemmap: include missing linux/moduleparam.h

The kernel test robot reported build failures with a 'randconfig' on s390:

Quoted 1 line
Quoted 1 line

mm/hugetlb_vmemmap.c:421:11: error: a function declaration without a

prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]

   core_param(hugetlb_free_vmemmap, vmemmap_optimize_enabled, bool, 0);
             ^
Fixes 30152245c63b ("mm: hugetlb_vmemmap: replace early_param() with core_param()")
---
 mm/hugetlb_vmemmap.c | 1 +
 1 file changed, 1 insertion(+)
mm/hugetlb_vmemmap.c +1 -0
index ba2a2596fb4e..4962dd1ba4a6 100644
@@ -11,6 +11,7 @@
 #define pr_fmt(fmt)	"HugeTLB: " fmt
 
 #include <linux/pgtable.h>
+#include <linux/moduleparam.h>
 #include <linux/bootmem_info.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
Signature · 1 line
2.38.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Vasily Gorbik

The kernel test robot reported build failures with a 'randconfig' on s390:

Quoted 1 line
Quoted 1 line

mm/hugetlb_vmemmap.c:421:11: error: a function declaration without a

prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]

  core_param(hugetlb_free_vmemmap, vmemmap_optimize_enabled, bool, 0);
            ^
Fixes 30152245c63b ("mm: hugetlb_vmemmap: replace early_param() with core_param()")

Thanks for your fixing. However, the correct commit that should be fixed is 42deddf3ef5c ("s390: select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP").

#2 lore raw
Quoted 10 lines · Muchun Song
Quoted 10 lines · Vasily Gorbik

The kernel test robot reported build failures with a 'randconfig' on s390:

Quoted 1 line
Quoted 1 line

mm/hugetlb_vmemmap.c:421:11: error: a function declaration without a

prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]

  core_param(hugetlb_free_vmemmap, vmemmap_optimize_enabled, bool, 0);
            ^
Quoted 8 lines
Quoted 3 lines
Fixes 30152245c63b ("mm: hugetlb_vmemmap: replace early_param() with core_param()")

Thanks for your fixing. However, the correct commit that should be fixed is 42deddf3ef5c ("s390: select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP").

Even on x86 the inclusion chain looks like:
CC mm/hugetlb_vmemmap.o
In file included from ./include/linux/module.h:22,

                 from ./include/linux/device/driver.h:21,
                 from ./include/linux/device.h:32,
                 from ./include/linux/blk_types.h:11,
                 from ./include/linux/writeback.h:13,
                 from ./include/linux/memcontrol.h:22,
                 from ./include/linux/swap.h:9,
                 from ./include/asm-generic/hugetlb.h:5,
                 from ./arch/x86/include/asm/hugetlb.h:6,
                 from ./include/linux/hugetlb.h:802,
                 from mm/hugetlb_vmemmap.h:11,
                 from mm/hugetlb_vmemmap.c:18:

./include/linux/moduleparam.h:2:2: warning: #warning included from here

With s390 defconfig:
CC mm/hugetlb_vmemmap.o
In file included from ./include/linux/module.h:22,

                 from ./include/linux/device/driver.h:21,
                 from ./include/linux/device.h:32,
                 from ./include/linux/blk_types.h:11,
                 from ./include/linux/writeback.h:13,
                 from ./include/linux/memcontrol.h:22,
                 from ./include/linux/swap.h:9,
                 from ./include/linux/userfaultfd_k.h:18, <-- randconfig disabled this path (CONFIG_USERFAULTFD)
                 from ./include/linux/hugetlb.h:14,
                 from mm/hugetlb_vmemmap.h:11,
                 from mm/hugetlb_vmemmap.c:17:

./include/linux/moduleparam.h:2:2: warning: #warning included from here

42deddf3ef5c ("s390: select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP") is just a one liner activating this feature and only present in linux-next and s390 features branch targeting v6.2. So, if you don't want to have

Fixes 30152245c63b ("mm: hugetlb_vmemmap: replace early_param() with core_param()")

fine with me. But then just dropping Fixes tag is probably a better option. I hope that won't prevent it from going into some v6.1-rcX.

@Andrew
should I resend? or would you be so kind to drop Fixes tag and add Reviewed-by without it? Thank you

maintainer
#3 lore raw
Quoted 4 lines · On Thu, 3 Nov 2022 17:02:02 +0100 Vasily Gorbik <[email protected]> wrote:

42deddf3ef5c ("s390: select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP") is just a one liner activating this feature and only present in linux-next and s390 features branch targeting v6.2. So, if you don't want to have

Quoted 8 lines
Fixes 30152245c63b ("mm: hugetlb_vmemmap: replace early_param() with core_param()")

fine with me. But then just dropping Fixes tag is probably a better option. I hope that won't prevent it from going into some v6.1-rcX.

@Andrew
should I resend? or would you be so kind to drop Fixes tag and add Reviewed-by without it? Thank you

I retained the

Fixes 30152245c63b ("mm: hugetlb_vmemmap: replace early_param() with core_param()")

and added Muchun's Reviewed-by:, thanks.