]> git.hungrycats.org Git - linux/commitdiff
[PATCH] use __attribute_const__ everywhere
authorAndrew Morton <akpm@osdl.org>
Wed, 4 Feb 2004 02:41:01 +0000 (18:41 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 4 Feb 2004 02:41:01 +0000 (18:41 -0800)
From: Nikita Danilov <Nikita@Namesys.COM>

Replace all existing usages of __attribute__((const)) with
__attribute_const__.

13 files changed:
arch/ia64/kernel/unwind.c
drivers/usb/class/audio.c
include/asm-alpha/byteorder.h
include/asm-arm/current.h
include/asm-arm/thread_info.h
include/asm-arm26/current.h
include/asm-arm26/thread_info.h
include/asm-m68k/virtconvert.h
include/asm-ppc/io.h
include/asm-ppc/pgtable.h
include/asm-sparc/btfixup.h
include/asm-sparc/pgtable.h
include/linux/reiserfs_fs.h

index a2f7322cd76b4cf5c60ef22fdf0dd6eb658fb77a..9eb9074452fae6de4705cd331397c02402332b05 100644 (file)
@@ -650,7 +650,7 @@ free_state_stack (struct unw_reg_state *rs)
 \f
 /* Unwind decoder routines */
 
-static enum unw_register_index __attribute__((const))
+static enum unw_register_index __attribute_const__
 decode_abreg (unsigned char abreg, int memory)
 {
        switch (abreg) {
index 618c42d4cb287c069fa77b2bf2e5152c66c3c0b6..37f6070e69367e421ae19d247b2ef933cc05cc0b 100644 (file)
 
 #define AUDIO_DEBUG 1
 
-#define SND_DEV_DSP16   5 
+#define SND_DEV_DSP16   5
 
 #define dprintk(x)
 
 #undef abs
-extern int abs(int __x) __attribute__ ((__const__)); /* Shut up warning */
+extern int abs(int __x) __attribute_const__; /* Shut up warning */
 
 /* --------------------------------------------------------------------- */
 
index ddf4e740e72ab1f5d3a662796cc840a29299cc7a..e5179c55920cf4683763f4eca87f6464c2ecc61f 100644 (file)
@@ -6,7 +6,7 @@
 
 #ifdef __GNUC__
 
-static __inline __u32 __attribute__((__const)) __arch__swab32(__u32 x)
+static __inline __u32 __attribute_const__ __arch__swab32(__u32 x)
 {
        /*
         * Unfortunately, we can't use the 6 instruction sequence
index b3d68cd03f7357fe1567ce3ee9d07fc117ede623..75d21e2a3ff7b2b02d122ac1a08b0155cd86dd1b 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <linux/thread_info.h>
 
-static inline struct task_struct *get_current(void) __attribute__ (( __const__ ));
+static inline struct task_struct *get_current(void) __attribute_const__;
 
 static inline struct task_struct *get_current(void)
 {
index 16a541206166b1cf5a3acad6857314348ba4e8bd..95e3c9c996d3094d2efdd6cdd65b674291c8fcf4 100644 (file)
@@ -77,7 +77,7 @@ struct thread_info {
 /*
  * how to get the thread information struct from C
  */
-static inline struct thread_info *current_thread_info(void) __attribute__ (( __const__ ));
+static inline struct thread_info *current_thread_info(void) __attribute_const__;
 
 static inline struct thread_info *current_thread_info(void)
 {
index b3d68cd03f7357fe1567ce3ee9d07fc117ede623..75d21e2a3ff7b2b02d122ac1a08b0155cd86dd1b 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <linux/thread_info.h>
 
-static inline struct task_struct *get_current(void) __attribute__ (( __const__ ));
+static inline struct task_struct *get_current(void) __attribute_const__;
 
 static inline struct task_struct *get_current(void)
 {
index 24c5136484fb48a36ef2aa72385f0521eea4de5e..e57f9b2b17b79e2f442df5d5a4fab62f18a20b43 100644 (file)
@@ -71,7 +71,7 @@ struct thread_info {
 /*
  * how to get the thread information struct from C
  */
-static inline struct thread_info *current_thread_info(void) __attribute__ (( __const__ ));
+static inline struct thread_info *current_thread_info(void) __attribute_const__;
 
 static inline struct thread_info *current_thread_info(void)
 {
index 435fca52a91e76df011b3b96e3c1c8ef51051eff..68205b61820c2c6a6b848948972ca7bc162a20bd 100644 (file)
@@ -19,8 +19,8 @@
  * Change virtual addresses to physical addresses and vv.
  */
 #ifndef CONFIG_SUN3
-extern unsigned long mm_vtop(unsigned long addr) __attribute__ ((const));
-extern unsigned long mm_ptov(unsigned long addr) __attribute__ ((const));
+extern unsigned long mm_vtop(unsigned long addr) __attribute_const__;
+extern unsigned long mm_ptov(unsigned long addr) __attribute_const__;
 #else
 static inline unsigned long mm_vtop(unsigned long vaddr)
 {
index ca70e02cb0d9db5defb1232221f65770b95edb07..0c78d0c505c7fe5a14291ac67a4e91f5aaf7678a 100644 (file)
@@ -211,7 +211,7 @@ extern void *ioremap64(unsigned long long address, unsigned long size);
 #define ioremap_nocache(addr, size)    ioremap((addr), (size))
 extern void iounmap(void *addr);
 extern unsigned long iopa(unsigned long addr);
-extern unsigned long mm_ptov(unsigned long addr) __attribute__ ((const));
+extern unsigned long mm_ptov(unsigned long addr) __attribute_const__;
 extern void io_block_mapping(unsigned long virt, phys_addr_t phys,
                             unsigned int size, int flags);
 
index 53fa036d620a4deb7ec17aeaff21328ab9eedf3e..0cf6aab40dfbd0110461154b4c1c06703a59cd2a 100644 (file)
@@ -626,7 +626,7 @@ extern void cache_clear(__u32 addr, int length);
 extern void cache_push(__u32 addr, int length);
 extern int mm_end_of_chunk (unsigned long addr, int len);
 extern unsigned long iopa(unsigned long addr);
-extern unsigned long mm_ptov(unsigned long addr) __attribute__ ((const));
+extern unsigned long mm_ptov(unsigned long addr) __attribute_const__;
 
 /* Values for nocacheflag and cmode */
 /* These are not used by the APUS kernel_map, but prevents
index f0ea6d09d1de1dd59e14bd91c3d88d3fc3ee6f66..b84c96c895816008a9413d1069d577ad464ddda3 100644 (file)
@@ -39,7 +39,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
        extern __type ___f_##__name(__args);                                            \
        extern unsigned ___fs_##__name[3];
 #define BTFIXUPDEF_CALL_CONST(__type, __name, __args...)                               \
-       extern __type ___f_##__name(__args) __attribute__((const));                     \
+       extern __type ___f_##__name(__args) __attribute_const__;                        \
        extern unsigned ___fs_##__name[3];
 #define BTFIXUP_CALL(__name) ___f_##__name
 
@@ -49,7 +49,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
 /* Put bottom 13bits into some register variable */
 
 #define BTFIXUPDEF_SIMM13(__name)                                                      \
-       extern unsigned int ___sf_##__name(void) __attribute__((const));                \
+       extern unsigned int ___sf_##__name(void) __attribute_const__;           \
        extern unsigned ___ss_##__name[2];                                              \
        extern __inline__ unsigned int ___sf_##__name(void) {                           \
                unsigned int ret;                                                       \
@@ -57,7 +57,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
                return ret;                                                             \
        }
 #define BTFIXUPDEF_SIMM13_INIT(__name,__val)                                           \
-       extern unsigned int ___sf_##__name(void) __attribute__((const));                \
+       extern unsigned int ___sf_##__name(void) __attribute_const__;           \
        extern unsigned ___ss_##__name[2];                                              \
        extern __inline__ unsigned int ___sf_##__name(void) {                           \
                unsigned int ret;                                                       \
@@ -71,7 +71,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
  */
 
 #define BTFIXUPDEF_HALF(__name)                                                                \
-       extern unsigned int ___af_##__name(void) __attribute__((const));                \
+       extern unsigned int ___af_##__name(void) __attribute_const__;           \
        extern unsigned ___as_##__name[2];                                              \
        extern __inline__ unsigned int ___af_##__name(void) {                           \
                unsigned int ret;                                                       \
@@ -79,7 +79,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
                return ret;                                                             \
        }
 #define BTFIXUPDEF_HALF_INIT(__name,__val)                                             \
-       extern unsigned int ___af_##__name(void) __attribute__((const));                \
+       extern unsigned int ___af_##__name(void) __attribute_const__;           \
        extern unsigned ___as_##__name[2];                                              \
        extern __inline__ unsigned int ___af_##__name(void) {                           \
                unsigned int ret;                                                       \
@@ -90,7 +90,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
 /* Put upper 22 bits into some register variable */
 
 #define BTFIXUPDEF_SETHI(__name)                                                       \
-       extern unsigned int ___hf_##__name(void) __attribute__((const));                \
+       extern unsigned int ___hf_##__name(void) __attribute_const__;           \
        extern unsigned ___hs_##__name[2];                                              \
        extern __inline__ unsigned int ___hf_##__name(void) {                           \
                unsigned int ret;                                                       \
@@ -98,7 +98,7 @@ extern unsigned int ___illegal_use_of_BTFIXUP_INT_in_module(void);
                return ret;                                                             \
        }
 #define BTFIXUPDEF_SETHI_INIT(__name,__val)                                            \
-       extern unsigned int ___hf_##__name(void) __attribute__((const));                \
+       extern unsigned int ___hf_##__name(void) __attribute_const__;           \
        extern unsigned ___hs_##__name[2];                                              \
        extern __inline__ unsigned int ___hf_##__name(void) {                           \
                unsigned int ret;                                                       \
index bba6e03c4cbbb0cb485e1d368fd236f7e2e82f8e..b0baa22ffa48bf52c6fdeb9579083ea7bbb5062e 100644 (file)
@@ -80,7 +80,7 @@ BTFIXUPDEF_SIMM13(pmd_shift)
 BTFIXUPDEF_SETHI(pmd_size)
 BTFIXUPDEF_SETHI(pmd_mask)
 
-extern unsigned int pmd_align(unsigned int addr) __attribute__((const));
+extern unsigned int pmd_align(unsigned int addr) __attribute_const__;
 extern __inline__ unsigned int pmd_align(unsigned int addr)
 {
        return ((addr + ~BTFIXUP_SETHI(pmd_mask)) & BTFIXUP_SETHI(pmd_mask));
@@ -90,7 +90,7 @@ BTFIXUPDEF_SIMM13(pgdir_shift)
 BTFIXUPDEF_SETHI(pgdir_size)
 BTFIXUPDEF_SETHI(pgdir_mask)
 
-extern unsigned int pgdir_align(unsigned int addr) __attribute__((const));
+extern unsigned int pgdir_align(unsigned int addr) __attribute_const__;
 extern __inline__ unsigned int pgdir_align(unsigned int addr)
 {
        return ((addr + ~BTFIXUP_SETHI(pgdir_mask)) & BTFIXUP_SETHI(pgdir_mask));
@@ -248,19 +248,19 @@ BTFIXUPDEF_HALF(pte_writei)
 BTFIXUPDEF_HALF(pte_dirtyi)
 BTFIXUPDEF_HALF(pte_youngi)
 
-extern int pte_write(pte_t pte) __attribute__((const));
+extern int pte_write(pte_t pte) __attribute_const__;
 extern __inline__ int pte_write(pte_t pte)
 {
        return pte_val(pte) & BTFIXUP_HALF(pte_writei);
 }
 
-extern int pte_dirty(pte_t pte) __attribute__((const));
+extern int pte_dirty(pte_t pte) __attribute_const__;
 extern __inline__ int pte_dirty(pte_t pte)
 {
        return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi);
 }
 
-extern int pte_young(pte_t pte) __attribute__((const));
+extern int pte_young(pte_t pte) __attribute_const__;
 extern __inline__ int pte_young(pte_t pte)
 {
        return pte_val(pte) & BTFIXUP_HALF(pte_youngi);
@@ -271,7 +271,7 @@ extern __inline__ int pte_young(pte_t pte)
  */
 BTFIXUPDEF_HALF(pte_filei)
 
-extern int pte_file(pte_t pte) __attribute__((const));
+extern int pte_file(pte_t pte) __attribute_const__;
 extern __inline__ int pte_file(pte_t pte)
 {
        return pte_val(pte) & BTFIXUP_HALF(pte_filei);
@@ -283,19 +283,19 @@ BTFIXUPDEF_HALF(pte_wrprotecti)
 BTFIXUPDEF_HALF(pte_mkcleani)
 BTFIXUPDEF_HALF(pte_mkoldi)
 
-extern pte_t pte_wrprotect(pte_t pte) __attribute__((const));
+extern pte_t pte_wrprotect(pte_t pte) __attribute_const__;
 extern __inline__ pte_t pte_wrprotect(pte_t pte)
 {
        return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti));
 }
 
-extern pte_t pte_mkclean(pte_t pte) __attribute__((const));
+extern pte_t pte_mkclean(pte_t pte) __attribute_const__;
 extern __inline__ pte_t pte_mkclean(pte_t pte)
 {
        return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani));
 }
 
-extern pte_t pte_mkold(pte_t pte) __attribute__((const));
+extern pte_t pte_mkold(pte_t pte) __attribute_const__;
 extern __inline__ pte_t pte_mkold(pte_t pte)
 {
        return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi));
@@ -332,7 +332,7 @@ BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_io, unsigned long, pgprot_t, int)
 
 BTFIXUPDEF_INT(pte_modify_mask)
 
-extern pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute__((const));
+extern pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__;
 extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot)
 {
        return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) |
index 594f305e613a188b526f0f5e382d379dbd0fae78..f05d63a025c4a2192bc51400be55de9289c1f6bb 100644 (file)
@@ -90,7 +90,7 @@ if( !( cond ) )                                                               \
 #define RFALSE( cond, format, args... ) do {;} while( 0 )
 #endif
 
-#define CONSTF __attribute__( ( const ) )
+#define CONSTF __attribute_const__
 /*
  * Disk Data Structures
  */