diff mbox series

mm: Fix missing function declaration

Message ID 20200819080026.918134-1-leon@kernel.org (mailing list archive)
State New, archived
Headers show
Series mm: Fix missing function declaration | expand

Commit Message

Leon Romanovsky Aug. 19, 2020, 8 a.m. UTC
From: Leon Romanovsky <leonro@nvidia.com>

The compilation with CONFIG_DEBUG_RODATA_TEST set produces the following
warning due to the missing include.

 mm/rodata_test.c:15:6: warning: no previous prototype for 'rodata_test' [-Wmissing-prototypes]
    15 | void rodata_test(void)
      |      ^~~~~~~~~~~

Fixes: 2959a5f726f6 ("mm: add arch-independent testcases for RODATA")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 mm/rodata_test.c | 1 +
 1 file changed, 1 insertion(+)

--
2.26.2

Comments

Anshuman Khandual Aug. 19, 2020, 8:46 a.m. UTC | #1
On 08/19/2020 01:30 PM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> The compilation with CONFIG_DEBUG_RODATA_TEST set produces the following
> warning due to the missing include.
> 
>  mm/rodata_test.c:15:6: warning: no previous prototype for 'rodata_test' [-Wmissing-prototypes]
>     15 | void rodata_test(void)
>       |      ^~~~~~~~~~~
> 
> Fixes: 2959a5f726f6 ("mm: add arch-independent testcases for RODATA")
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

This build failure appears only with W=1 and gets fixed with this.

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>

> ---
>  mm/rodata_test.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/rodata_test.c b/mm/rodata_test.c
> index 2a99df7beeb3..2613371945b7 100644
> --- a/mm/rodata_test.c
> +++ b/mm/rodata_test.c
> @@ -7,6 +7,7 @@
>   */
>  #define pr_fmt(fmt) "rodata_test: " fmt
> 
> +#include <linux/rodata_test.h>
>  #include <linux/uaccess.h>
>  #include <asm/sections.h>
> 
> --
> 2.26.2
> 
> 
>
Leon Romanovsky Aug. 19, 2020, 9:39 a.m. UTC | #2
On Wed, Aug 19, 2020 at 02:16:39PM +0530, Anshuman Khandual wrote:
>
>
> On 08/19/2020 01:30 PM, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@nvidia.com>
> >
> > The compilation with CONFIG_DEBUG_RODATA_TEST set produces the following
> > warning due to the missing include.
> >
> >  mm/rodata_test.c:15:6: warning: no previous prototype for 'rodata_test' [-Wmissing-prototypes]
> >     15 | void rodata_test(void)
> >       |      ^~~~~~~~~~~
> >
> > Fixes: 2959a5f726f6 ("mm: add arch-independent testcases for RODATA")
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
>
> This build failure appears only with W=1 and gets fixed with this.

It is our default compilation level for Mellanox RDMA submissions.

>
> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>

Thanks

>
> > ---
> >  mm/rodata_test.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/mm/rodata_test.c b/mm/rodata_test.c
> > index 2a99df7beeb3..2613371945b7 100644
> > --- a/mm/rodata_test.c
> > +++ b/mm/rodata_test.c
> > @@ -7,6 +7,7 @@
> >   */
> >  #define pr_fmt(fmt) "rodata_test: " fmt
> >
> > +#include <linux/rodata_test.h>
> >  #include <linux/uaccess.h>
> >  #include <asm/sections.h>
> >
> > --
> > 2.26.2
> >
> >
> >
diff mbox series

Patch

diff --git a/mm/rodata_test.c b/mm/rodata_test.c
index 2a99df7beeb3..2613371945b7 100644
--- a/mm/rodata_test.c
+++ b/mm/rodata_test.c
@@ -7,6 +7,7 @@ 
  */
 #define pr_fmt(fmt) "rodata_test: " fmt

+#include <linux/rodata_test.h>
 #include <linux/uaccess.h>
 #include <asm/sections.h>