Skip to content

Commit

Permalink
x86: include proper prototypes for rodata_test
Browse files Browse the repository at this point in the history
extern should not appear in C files.  Also, the definitions
do not match the prototype currently, not sure what way you
want to go with this, I've switched the prototype to return
int, but I can see going to the void return as well.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Harvey Harrison authored and Ingo Molnar committed Feb 14, 2008
1 parent 184652e commit 7bfeab9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/x86/kernel/test_rodata.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* of the License.
*/
#include <linux/module.h>
#include <asm/cacheflush.h>
#include <asm/sections.h>
extern int rodata_test_data;

int rodata_test(void)
{
Expand Down
1 change: 1 addition & 0 deletions arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <asm/sections.h>
#include <asm/paravirt.h>
#include <asm/setup.h>
#include <asm/cacheflush.h>

unsigned int __VMALLOC_RESERVE = 128 << 20;

Expand Down
1 change: 1 addition & 0 deletions arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include <asm/sections.h>
#include <asm/kdebug.h>
#include <asm/numa.h>
#include <asm/cacheflush.h>

const struct dma_mapping_ops *dma_ops;
EXPORT_SYMBOL(dma_ops);
Expand Down
7 changes: 5 additions & 2 deletions include/asm-x86/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ void cpa_init(void);

#ifdef CONFIG_DEBUG_RODATA
void mark_rodata_ro(void);
extern const int rodata_test_data;
#endif

#ifdef CONFIG_DEBUG_RODATA_TEST
void rodata_test(void);
int rodata_test(void);
#else
static inline void rodata_test(void)
static inline int rodata_test(void)
{
return 0;
}
#endif

Expand Down

0 comments on commit 7bfeab9

Please sign in to comment.