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