1
0
Fork 0

microblaze: Change extern inline to static inline

With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the opposite thing from older versions of gcc
(emits code for an externally linkable version of the inline function).

"static inline" does the intended behavior in all cases instead.

Description taken from:
"staging, rtl8192e, LLVMLinux: Change extern inline to static inline"
(sha1: 6d91857d48)

The patch removes compilation warnings W=1:
./arch/microblaze/include/asm/delay.h:18:20: warning: no previous
prototype for '__delay' [-Wmissing-prototypes]
 extern inline void __delay(unsigned long loops)
./arch/microblaze/include/asm/delay.h:46:20: warning: no previous
prototype for '__udelay' [-Wmissing-prototypes]
 extern inline void __udelay(unsigned int x)
./arch/microblaze/include/asm/pgalloc.h:63:22: warning: no previous
prototype for 'get_pgd_slow' [-Wmissing-prototypes]
 extern inline pgd_t *get_pgd_slow(void)
./arch/microblaze/include/asm/pgalloc.h:73:22: warning: no previous
prototype for 'get_pgd_fast' [-Wmissing-prototypes]
 extern inline pgd_t *get_pgd_fast(void)
./arch/microblaze/include/asm/pgalloc.h:87:20: warning: no previous
prototype for 'free_pgd_fast' [-Wmissing-prototypes]
 extern inline void free_pgd_fast(pgd_t *pgd)
./arch/microblaze/include/asm/pgalloc.h:94:20: warning: no previous
prototype for 'free_pgd_slow' [-Wmissing-prototypes]
 extern inline void free_pgd_slow(pgd_t *pgd)
./arch/microblaze/include/asm/pgalloc.h:149:20: warning: no previous
prototype for 'pte_free_fast' [-Wmissing-prototypes]
 extern inline void pte_free_fast(pte_t *pte)
./arch/microblaze/include/asm/pgalloc.h:156:20: warning: no previous
prototype for 'pte_free_kernel' [-Wmissing-prototypes]
 extern inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
./arch/microblaze/include/asm/pgalloc.h:161:20: warning: no previous
prototype for 'pte_free_slow' [-Wmissing-prototypes]
 extern inline void pte_free_slow(struct page *ptepage)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
hifive-unleashed-5.1
Michal Simek 2014-12-18 15:51:30 +01:00
parent e14ebe417c
commit b6db0a5621
2 changed files with 9 additions and 9 deletions

View File

@ -15,7 +15,7 @@
#include <linux/param.h>
extern inline void __delay(unsigned long loops)
static inline void __delay(unsigned long loops)
{
asm volatile ("# __delay \n\t" \
"1: addi %0, %0, -1\t\n" \
@ -43,7 +43,7 @@ extern inline void __delay(unsigned long loops)
extern unsigned long loops_per_jiffy;
extern inline void __udelay(unsigned int x)
static inline void __udelay(unsigned int x)
{
unsigned long long tmp =

View File

@ -60,7 +60,7 @@ extern unsigned long get_zero_page_fast(void);
extern void __bad_pte(pmd_t *pmd);
extern inline pgd_t *get_pgd_slow(void)
static inline pgd_t *get_pgd_slow(void)
{
pgd_t *ret;
@ -70,7 +70,7 @@ extern inline pgd_t *get_pgd_slow(void)
return ret;
}
extern inline pgd_t *get_pgd_fast(void)
static inline pgd_t *get_pgd_fast(void)
{
unsigned long *ret;
@ -84,14 +84,14 @@ extern inline pgd_t *get_pgd_fast(void)
return (pgd_t *)ret;
}
extern inline void free_pgd_fast(pgd_t *pgd)
static inline void free_pgd_fast(pgd_t *pgd)
{
*(unsigned long **)pgd = pgd_quicklist;
pgd_quicklist = (unsigned long *) pgd;
pgtable_cache_size++;
}
extern inline void free_pgd_slow(pgd_t *pgd)
static inline void free_pgd_slow(pgd_t *pgd)
{
free_page((unsigned long)pgd);
}
@ -146,19 +146,19 @@ static inline pte_t *pte_alloc_one_fast(struct mm_struct *mm,
return (pte_t *)ret;
}
extern inline void pte_free_fast(pte_t *pte)
static inline void pte_free_fast(pte_t *pte)
{
*(unsigned long **)pte = pte_quicklist;
pte_quicklist = (unsigned long *) pte;
pgtable_cache_size++;
}
extern inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
{
free_page((unsigned long)pte);
}
extern inline void pte_free_slow(struct page *ptepage)
static inline void pte_free_slow(struct page *ptepage)
{
__free_page(ptepage);
}