microblaze: Change extern inline to static inline
authorMichal Simek <michal.simek@xilinx.com>
Thu, 18 Dec 2014 14:51:30 +0000 (15:51 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 5 Jan 2015 11:36:44 +0000 (12:36 +0100)
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: 6d91857d4826b382b3fd4fad95f52713be646f96)

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>
arch/microblaze/include/asm/delay.h
arch/microblaze/include/asm/pgalloc.h

index 60cb39deb533975c690f4f47240e1e9c7cd2d68c..ea2a9cd9b15984a18065e8c4cdb52d962ae4ae91 100644 (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 =
index 7fdf7fabc7d7f0b752f6c8a4727b23c24a9f1438..61436d69775ca216096cd95169e2bd89eb34b526 100644 (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);
 }