Skip to contentSkip to conversation

mm: Fix missing function declaration

PATCH Applied Leon Romanovsky 2 participants 3 messages Aug 19, 2020

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

PATCH 1/1 mm: Fix missing function declaration

From: Leon Romanovsky <[email protected]>

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")
---
 mm/rodata_test.c | 1 +
 1 file changed, 1 insertion(+)
mm/rodata_test.c +1 -0
index 2a99df7beeb3..2613371945b7 100644
@@ -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

Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

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")

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

Quoted 21 lines
---
 mm/rodata_test.c | 1 +
 1 file changed, 1 insertion(+)
mm/rodata_test.c +1 -1
index 2a99df7beeb3..2613371945b7 100644
@@ -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

#2 lore raw
Quoted 8 lines · Anshuman Khandual
Quoted 5 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

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

Quoted 8 lines
Quoted 6 lines

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")

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

It is our default compilation level for Mellanox RDMA submissions.

Quoted 2 lines

Thanks

Quoted 22 lines
Quoted 22 lines
---
 mm/rodata_test.c | 1 +
 1 file changed, 1 insertion(+)
mm/rodata_test.c +1 -1
index 2a99df7beeb3..2613371945b7 100644
@@ -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