aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2005-10-05 03:36:02 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-05 10:33:42 -0400
commit329d4dd72e5c3393a0c7aeebf3e62df77b196d71 (patch)
tree56875e380ca40310c4b3dafaef9284dfe3974026
parent9bc39bec87ee3e35897fe27441e979e7c208f624 (diff)
[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>
-rw-r--r--include/asm-sparc/btfixup.h12
-rw-r--r--include/asm-sparc/pgtable.h16
2 files changed, 14 insertions, 14 deletions
diff --git a/include/asm-sparc/btfixup.h b/include/asm-sparc/btfixup.h
index 6b29503256f..c2868d0f60b 100644
--- a/include/asm-sparc/btfixup.h
+++ b/include/asm-sparc/btfixup.h
@@ -49,7 +49,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
49/* Put bottom 13bits into some register variable */ 49/* Put bottom 13bits into some register variable */
50 50
51#define BTFIXUPDEF_SIMM13(__name) \ 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 extern unsigned ___ss_##__name[2]; \ 53 extern unsigned ___ss_##__name[2]; \
54 static inline unsigned int ___sf_##__name(void) { \ 54 static inline unsigned int ___sf_##__name(void) { \
55 unsigned int ret; \ 55 unsigned int ret; \
@@ -57,7 +57,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
57 return ret; \ 57 return ret; \
58 } 58 }
59#define BTFIXUPDEF_SIMM13_INIT(__name,__val) \ 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 extern unsigned ___ss_##__name[2]; \ 61 extern unsigned ___ss_##__name[2]; \
62 static inline unsigned int ___sf_##__name(void) { \ 62 static inline unsigned int ___sf_##__name(void) { \
63 unsigned int ret; \ 63 unsigned int ret; \
@@ -71,7 +71,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
71 */ 71 */
72 72
73#define BTFIXUPDEF_HALF(__name) \ 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 extern unsigned ___as_##__name[2]; \ 75 extern unsigned ___as_##__name[2]; \
76 static inline unsigned int ___af_##__name(void) { \ 76 static inline unsigned int ___af_##__name(void) { \
77 unsigned int ret; \ 77 unsigned int ret; \
@@ -79,7 +79,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
79 return ret; \ 79 return ret; \
80 } 80 }
81#define BTFIXUPDEF_HALF_INIT(__name,__val) \ 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 extern unsigned ___as_##__name[2]; \ 83 extern unsigned ___as_##__name[2]; \
84 static inline unsigned int ___af_##__name(void) { \ 84 static inline unsigned int ___af_##__name(void) { \
85 unsigned int ret; \ 85 unsigned int ret; \
@@ -90,7 +90,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
90/* Put upper 22 bits into some register variable */ 90/* Put upper 22 bits into some register variable */
91 91
92#define BTFIXUPDEF_SETHI(__name) \ 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 extern unsigned ___hs_##__name[2]; \ 94 extern unsigned ___hs_##__name[2]; \
95 static inline unsigned int ___hf_##__name(void) { \ 95 static inline unsigned int ___hf_##__name(void) { \
96 unsigned int ret; \ 96 unsigned int ret; \
@@ -98,7 +98,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
98 return ret; \ 98 return ret; \
99 } 99 }
100#define BTFIXUPDEF_SETHI_INIT(__name,__val) \ 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 extern unsigned ___hs_##__name[2]; \ 102 extern unsigned ___hs_##__name[2]; \
103 static inline unsigned int ___hf_##__name(void) { \ 103 static inline unsigned int ___hf_##__name(void) { \
104 unsigned int ret; \ 104 unsigned int ret; \
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h
index ae883f295f1..a14e9867750 100644
--- a/include/asm-sparc/pgtable.h
+++ b/include/asm-sparc/pgtable.h
@@ -194,19 +194,19 @@ BTFIXUPDEF_HALF(pte_writei)
194BTFIXUPDEF_HALF(pte_dirtyi) 194BTFIXUPDEF_HALF(pte_dirtyi)
195BTFIXUPDEF_HALF(pte_youngi) 195BTFIXUPDEF_HALF(pte_youngi)
196 196
197extern int pte_write(pte_t pte) __attribute_const__; 197static int pte_write(pte_t pte) __attribute_const__;
198static inline int pte_write(pte_t pte) 198static inline int pte_write(pte_t pte)
199{ 199{
200 return pte_val(pte) & BTFIXUP_HALF(pte_writei); 200 return pte_val(pte) & BTFIXUP_HALF(pte_writei);
201} 201}
202 202
203extern int pte_dirty(pte_t pte) __attribute_const__; 203static int pte_dirty(pte_t pte) __attribute_const__;
204static inline int pte_dirty(pte_t pte) 204static inline int pte_dirty(pte_t pte)
205{ 205{
206 return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi); 206 return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi);
207} 207}
208 208
209extern int pte_young(pte_t pte) __attribute_const__; 209static int pte_young(pte_t pte) __attribute_const__;
210static inline int pte_young(pte_t pte) 210static inline int pte_young(pte_t pte)
211{ 211{
212 return pte_val(pte) & BTFIXUP_HALF(pte_youngi); 212 return pte_val(pte) & BTFIXUP_HALF(pte_youngi);
@@ -217,7 +217,7 @@ static inline int pte_young(pte_t pte)
217 */ 217 */
218BTFIXUPDEF_HALF(pte_filei) 218BTFIXUPDEF_HALF(pte_filei)
219 219
220extern int pte_file(pte_t pte) __attribute_const__; 220static int pte_file(pte_t pte) __attribute_const__;
221static inline int pte_file(pte_t pte) 221static inline int pte_file(pte_t pte)
222{ 222{
223 return pte_val(pte) & BTFIXUP_HALF(pte_filei); 223 return pte_val(pte) & BTFIXUP_HALF(pte_filei);
@@ -229,19 +229,19 @@ BTFIXUPDEF_HALF(pte_wrprotecti)
229BTFIXUPDEF_HALF(pte_mkcleani) 229BTFIXUPDEF_HALF(pte_mkcleani)
230BTFIXUPDEF_HALF(pte_mkoldi) 230BTFIXUPDEF_HALF(pte_mkoldi)
231 231
232extern pte_t pte_wrprotect(pte_t pte) __attribute_const__; 232static pte_t pte_wrprotect(pte_t pte) __attribute_const__;
233static inline pte_t pte_wrprotect(pte_t pte) 233static inline pte_t pte_wrprotect(pte_t pte)
234{ 234{
235 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti)); 235 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti));
236} 236}
237 237
238extern pte_t pte_mkclean(pte_t pte) __attribute_const__; 238static pte_t pte_mkclean(pte_t pte) __attribute_const__;
239static inline pte_t pte_mkclean(pte_t pte) 239static inline pte_t pte_mkclean(pte_t pte)
240{ 240{
241 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani)); 241 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani));
242} 242}
243 243
244extern pte_t pte_mkold(pte_t pte) __attribute_const__; 244static pte_t pte_mkold(pte_t pte) __attribute_const__;
245static inline pte_t pte_mkold(pte_t pte) 245static inline pte_t pte_mkold(pte_t pte)
246{ 246{
247 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi)); 247 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi));
@@ -278,7 +278,7 @@ BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_io, unsigned long, pgprot_t, int)
278 278
279BTFIXUPDEF_INT(pte_modify_mask) 279BTFIXUPDEF_INT(pte_modify_mask)
280 280
281extern pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; 281static pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__;
282static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) 282static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
283{ 283{
284 return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) | 284 return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) |