linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/32s: Include <linux/moduleloader.h> header file to fix a warning
@ 2019-05-23  6:49 Mathieu Malaterre
  2019-05-23  6:54 ` Christophe Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Malaterre @ 2019-05-23  6:49 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Mathieu Malaterre, Paul Mackerras, linuxppc-dev, linux-kernel

In commit 2edb16efc899 ("powerpc/32: Add KASAN support") support for
KASAN has been added. However building it as module leads to (warning
treated as error with W=1):

  arch/powerpc/mm/kasan/kasan_init_32.c:135:7: error: no previous prototype for 'module_alloc' [-Werror=missing-prototypes]

Make sure to include <linux/moduleloader.h> to provide the following
prototype: module_alloc.

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/powerpc/mm/kasan/kasan_init_32.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/mm/kasan/kasan_init_32.c b/arch/powerpc/mm/kasan/kasan_init_32.c
index 0d62be3cba47..0c31e440d094 100644
--- a/arch/powerpc/mm/kasan/kasan_init_32.c
+++ b/arch/powerpc/mm/kasan/kasan_init_32.c
@@ -7,6 +7,7 @@
 #include <linux/memblock.h>
 #include <linux/sched/task.h>
 #include <linux/vmalloc.h>
+#include <linux/moduleloader.h>
 #include <asm/pgalloc.h>
 #include <asm/code-patching.h>
 #include <mm/mmu_decl.h>
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc/32s: Include <linux/moduleloader.h> header file to fix a warning
  2019-05-23  6:49 [PATCH] powerpc/32s: Include <linux/moduleloader.h> header file to fix a warning Mathieu Malaterre
@ 2019-05-23  6:54 ` Christophe Leroy
  0 siblings, 0 replies; 2+ messages in thread
From: Christophe Leroy @ 2019-05-23  6:54 UTC (permalink / raw)
  To: Mathieu Malaterre, Michael Ellerman
  Cc: linuxppc-dev, Paul Mackerras, linux-kernel



Le 23/05/2019 à 08:49, Mathieu Malaterre a écrit :
> In commit 2edb16efc899 ("powerpc/32: Add KASAN support") support for
> KASAN has been added. However building it as module leads to (warning
> treated as error with W=1):
> 
>    arch/powerpc/mm/kasan/kasan_init_32.c:135:7: error: no previous prototype for 'module_alloc' [-Werror=missing-prototypes]
> 
> Make sure to include <linux/moduleloader.h> to provide the following
> prototype: module_alloc.
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

Fixes: 2edb16efc899 ("powerpc/32: Add KASAN support")
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>

> ---
>   arch/powerpc/mm/kasan/kasan_init_32.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/powerpc/mm/kasan/kasan_init_32.c b/arch/powerpc/mm/kasan/kasan_init_32.c
> index 0d62be3cba47..0c31e440d094 100644
> --- a/arch/powerpc/mm/kasan/kasan_init_32.c
> +++ b/arch/powerpc/mm/kasan/kasan_init_32.c
> @@ -7,6 +7,7 @@
>   #include <linux/memblock.h>
>   #include <linux/sched/task.h>
>   #include <linux/vmalloc.h>
> +#include <linux/moduleloader.h>
>   #include <asm/pgalloc.h>
>   #include <asm/code-patching.h>
>   #include <mm/mmu_decl.h>
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-23  6:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23  6:49 [PATCH] powerpc/32s: Include <linux/moduleloader.h> header file to fix a warning Mathieu Malaterre
2019-05-23  6:54 ` Christophe Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).