Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 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>

+9 -9
+2 -2
arch/microblaze/include/asm/delay.h
··· 15 15 16 16 #include <linux/param.h> 17 17 18 - extern inline void __delay(unsigned long loops) 18 + static inline void __delay(unsigned long loops) 19 19 { 20 20 asm volatile ("# __delay \n\t" \ 21 21 "1: addi %0, %0, -1\t\n" \ ··· 43 43 44 44 extern unsigned long loops_per_jiffy; 45 45 46 - extern inline void __udelay(unsigned int x) 46 + static inline void __udelay(unsigned int x) 47 47 { 48 48 49 49 unsigned long long tmp =
+7 -7
arch/microblaze/include/asm/pgalloc.h
··· 60 60 61 61 extern void __bad_pte(pmd_t *pmd); 62 62 63 - extern inline pgd_t *get_pgd_slow(void) 63 + static inline pgd_t *get_pgd_slow(void) 64 64 { 65 65 pgd_t *ret; 66 66 ··· 70 70 return ret; 71 71 } 72 72 73 - extern inline pgd_t *get_pgd_fast(void) 73 + static inline pgd_t *get_pgd_fast(void) 74 74 { 75 75 unsigned long *ret; 76 76 ··· 84 84 return (pgd_t *)ret; 85 85 } 86 86 87 - extern inline void free_pgd_fast(pgd_t *pgd) 87 + static inline void free_pgd_fast(pgd_t *pgd) 88 88 { 89 89 *(unsigned long **)pgd = pgd_quicklist; 90 90 pgd_quicklist = (unsigned long *) pgd; 91 91 pgtable_cache_size++; 92 92 } 93 93 94 - extern inline void free_pgd_slow(pgd_t *pgd) 94 + static inline void free_pgd_slow(pgd_t *pgd) 95 95 { 96 96 free_page((unsigned long)pgd); 97 97 } ··· 146 146 return (pte_t *)ret; 147 147 } 148 148 149 - extern inline void pte_free_fast(pte_t *pte) 149 + static inline void pte_free_fast(pte_t *pte) 150 150 { 151 151 *(unsigned long **)pte = pte_quicklist; 152 152 pte_quicklist = (unsigned long *) pte; 153 153 pgtable_cache_size++; 154 154 } 155 155 156 - extern inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) 156 + static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) 157 157 { 158 158 free_page((unsigned long)pte); 159 159 } 160 160 161 - extern inline void pte_free_slow(struct page *ptepage) 161 + static inline void pte_free_slow(struct page *ptepage) 162 162 { 163 163 __free_page(ptepage); 164 164 }