[PATCH] fix the breakage in sparc headers

If we switch extern inline to static inline, we'd better switch the
pre-declarations we use to say that these puppies have
__attribute_const__ on them.

Otherwise we get extern declaration followed by static inline one.
Which makes gcc unhappy, and for a good reason...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Al Viro and committed by Linus Torvalds 329d4dd7 9bc39bec

+14 -14
+6 -6
include/asm-sparc/btfixup.h
··· 49 49 /* Put bottom 13bits into some register variable */ 50 50 51 51 #define BTFIXUPDEF_SIMM13(__name) \ 52 - extern unsigned int ___sf_##__name(void) __attribute_const__; \ 52 + static inline unsigned int ___sf_##__name(void) __attribute_const__; \ 53 53 extern unsigned ___ss_##__name[2]; \ 54 54 static inline unsigned int ___sf_##__name(void) { \ 55 55 unsigned int ret; \ ··· 57 57 return ret; \ 58 58 } 59 59 #define BTFIXUPDEF_SIMM13_INIT(__name,__val) \ 60 - extern unsigned int ___sf_##__name(void) __attribute_const__; \ 60 + static inline unsigned int ___sf_##__name(void) __attribute_const__; \ 61 61 extern unsigned ___ss_##__name[2]; \ 62 62 static inline unsigned int ___sf_##__name(void) { \ 63 63 unsigned int ret; \ ··· 71 71 */ 72 72 73 73 #define BTFIXUPDEF_HALF(__name) \ 74 - extern unsigned int ___af_##__name(void) __attribute_const__; \ 74 + static inline unsigned int ___af_##__name(void) __attribute_const__; \ 75 75 extern unsigned ___as_##__name[2]; \ 76 76 static inline unsigned int ___af_##__name(void) { \ 77 77 unsigned int ret; \ ··· 79 79 return ret; \ 80 80 } 81 81 #define BTFIXUPDEF_HALF_INIT(__name,__val) \ 82 - extern unsigned int ___af_##__name(void) __attribute_const__; \ 82 + static inline unsigned int ___af_##__name(void) __attribute_const__; \ 83 83 extern unsigned ___as_##__name[2]; \ 84 84 static inline unsigned int ___af_##__name(void) { \ 85 85 unsigned int ret; \ ··· 90 90 /* Put upper 22 bits into some register variable */ 91 91 92 92 #define BTFIXUPDEF_SETHI(__name) \ 93 - extern unsigned int ___hf_##__name(void) __attribute_const__; \ 93 + static inline unsigned int ___hf_##__name(void) __attribute_const__; \ 94 94 extern unsigned ___hs_##__name[2]; \ 95 95 static inline unsigned int ___hf_##__name(void) { \ 96 96 unsigned int ret; \ ··· 98 98 return ret; \ 99 99 } 100 100 #define BTFIXUPDEF_SETHI_INIT(__name,__val) \ 101 - extern unsigned int ___hf_##__name(void) __attribute_const__; \ 101 + static inline unsigned int ___hf_##__name(void) __attribute_const__; \ 102 102 extern unsigned ___hs_##__name[2]; \ 103 103 static inline unsigned int ___hf_##__name(void) { \ 104 104 unsigned int ret; \
+8 -8
include/asm-sparc/pgtable.h
··· 194 194 BTFIXUPDEF_HALF(pte_dirtyi) 195 195 BTFIXUPDEF_HALF(pte_youngi) 196 196 197 - extern int pte_write(pte_t pte) __attribute_const__; 197 + static int pte_write(pte_t pte) __attribute_const__; 198 198 static inline int pte_write(pte_t pte) 199 199 { 200 200 return pte_val(pte) & BTFIXUP_HALF(pte_writei); 201 201 } 202 202 203 - extern int pte_dirty(pte_t pte) __attribute_const__; 203 + static int pte_dirty(pte_t pte) __attribute_const__; 204 204 static inline int pte_dirty(pte_t pte) 205 205 { 206 206 return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi); 207 207 } 208 208 209 - extern int pte_young(pte_t pte) __attribute_const__; 209 + static int pte_young(pte_t pte) __attribute_const__; 210 210 static inline int pte_young(pte_t pte) 211 211 { 212 212 return pte_val(pte) & BTFIXUP_HALF(pte_youngi); ··· 217 217 */ 218 218 BTFIXUPDEF_HALF(pte_filei) 219 219 220 - extern int pte_file(pte_t pte) __attribute_const__; 220 + static int pte_file(pte_t pte) __attribute_const__; 221 221 static inline int pte_file(pte_t pte) 222 222 { 223 223 return pte_val(pte) & BTFIXUP_HALF(pte_filei); ··· 229 229 BTFIXUPDEF_HALF(pte_mkcleani) 230 230 BTFIXUPDEF_HALF(pte_mkoldi) 231 231 232 - extern pte_t pte_wrprotect(pte_t pte) __attribute_const__; 232 + static pte_t pte_wrprotect(pte_t pte) __attribute_const__; 233 233 static inline pte_t pte_wrprotect(pte_t pte) 234 234 { 235 235 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti)); 236 236 } 237 237 238 - extern pte_t pte_mkclean(pte_t pte) __attribute_const__; 238 + static pte_t pte_mkclean(pte_t pte) __attribute_const__; 239 239 static inline pte_t pte_mkclean(pte_t pte) 240 240 { 241 241 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani)); 242 242 } 243 243 244 - extern pte_t pte_mkold(pte_t pte) __attribute_const__; 244 + static pte_t pte_mkold(pte_t pte) __attribute_const__; 245 245 static inline pte_t pte_mkold(pte_t pte) 246 246 { 247 247 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi)); ··· 278 278 279 279 BTFIXUPDEF_INT(pte_modify_mask) 280 280 281 - extern pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; 281 + static pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; 282 282 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) 283 283 { 284 284 return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) |