Skip to content

Commit

Permalink
[PATCH] xtensa: replace 'extern inline' with 'static inline'
Browse files Browse the repository at this point in the history
"extern inline" doesn't make sense.

Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Chris Zankel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
AdrianBunk authored and Linus Torvalds committed Sep 5, 2005
1 parent 7ef9390 commit d99cf71
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 70 deletions.
12 changes: 6 additions & 6 deletions include/asm-xtensa/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ typedef struct { volatile int counter; } atomic_t;
*
* Atomically adds @i to @v.
*/
extern __inline__ void atomic_add(int i, atomic_t * v)
static inline void atomic_add(int i, atomic_t * v)
{
unsigned int vval;

Expand All @@ -90,7 +90,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v)
*
* Atomically subtracts @i from @v.
*/
extern __inline__ void atomic_sub(int i, atomic_t *v)
static inline void atomic_sub(int i, atomic_t *v)
{
unsigned int vval;

Expand All @@ -111,7 +111,7 @@ extern __inline__ void atomic_sub(int i, atomic_t *v)
* We use atomic_{add|sub}_return to define other functions.
*/

extern __inline__ int atomic_add_return(int i, atomic_t * v)
static inline int atomic_add_return(int i, atomic_t * v)
{
unsigned int vval;

Expand All @@ -130,7 +130,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v)
return vval;
}

extern __inline__ int atomic_sub_return(int i, atomic_t * v)
static inline int atomic_sub_return(int i, atomic_t * v)
{
unsigned int vval;

Expand Down Expand Up @@ -224,7 +224,7 @@ extern __inline__ int atomic_sub_return(int i, atomic_t * v)
#define atomic_add_negative(i,v) (atomic_add_return((i),(v)) < 0)


extern __inline__ void atomic_clear_mask(unsigned int mask, atomic_t *v)
static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
{
unsigned int all_f = -1;
unsigned int vval;
Expand All @@ -243,7 +243,7 @@ extern __inline__ void atomic_clear_mask(unsigned int mask, atomic_t *v)
);
}

extern __inline__ void atomic_set_mask(unsigned int mask, atomic_t *v)
static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
{
unsigned int vval;

Expand Down
4 changes: 2 additions & 2 deletions include/asm-xtensa/checksum.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ asmlinkage unsigned int csum_partial_copy_generic( const char *src, char *dst, i
* If you use these functions directly please don't forget the
* verify_area().
*/
extern __inline__
static inline
unsigned int csum_partial_copy_nocheck ( const char *src, char *dst,
int len, int sum)
{
return csum_partial_copy_generic ( src, dst, len, sum, NULL, NULL);
}

extern __inline__
static inline
unsigned int csum_partial_copy_from_user ( const char *src, char *dst,
int len, int sum, int *err_ptr)
{
Expand Down
2 changes: 1 addition & 1 deletion include/asm-xtensa/delay.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

extern unsigned long loops_per_jiffy;

extern __inline__ void __delay(unsigned long loops)
static inline void __delay(unsigned long loops)
{
/* 2 cycles per loop. */
__asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b"
Expand Down
14 changes: 7 additions & 7 deletions include/asm-xtensa/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ static inline unsigned int _swapl (unsigned int v)
* These are trivial on the 1:1 Linux/Xtensa mapping
*/

extern inline unsigned long virt_to_phys(volatile void * address)
static inline unsigned long virt_to_phys(volatile void * address)
{
return PHYSADDR((unsigned long)address);
}

extern inline void * phys_to_virt(unsigned long address)
static inline void * phys_to_virt(unsigned long address)
{
return (void*) CACHED_ADDR(address);
}
Expand All @@ -55,12 +55,12 @@ extern inline void * phys_to_virt(unsigned long address)
* IO bus memory addresses are also 1:1 with the physical address
*/

extern inline unsigned long virt_to_bus(volatile void * address)
static inline unsigned long virt_to_bus(volatile void * address)
{
return PHYSADDR((unsigned long)address);
}

extern inline void * bus_to_virt (unsigned long address)
static inline void * bus_to_virt (unsigned long address)
{
return (void *) CACHED_ADDR(address);
}
Expand All @@ -69,17 +69,17 @@ extern inline void * bus_to_virt (unsigned long address)
* Change "struct page" to physical address.
*/

extern inline void *ioremap(unsigned long offset, unsigned long size)
static inline void *ioremap(unsigned long offset, unsigned long size)
{
return (void *) CACHED_ADDR_IO(offset);
}

extern inline void *ioremap_nocache(unsigned long offset, unsigned long size)
static inline void *ioremap_nocache(unsigned long offset, unsigned long size)
{
return (void *) BYPASS_ADDR_IO(offset);
}

extern inline void iounmap(void *addr)
static inline void iounmap(void *addr)
{
}

Expand Down
18 changes: 9 additions & 9 deletions include/asm-xtensa/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ extern pgd_t *current_pgd;
#define ASID_FIRST_VERSION \
((unsigned long)(~ASID_VERSION_MASK) + 1 + ASID_FIRST_NONRESERVED)

extern inline void set_rasid_register (unsigned long val)
static inline void set_rasid_register (unsigned long val)
{
__asm__ __volatile__ (" wsr %0, "__stringify(RASID)"\n\t"
" isync\n" : : "a" (val));
}

extern inline unsigned long get_rasid_register (void)
static inline unsigned long get_rasid_register (void)
{
unsigned long tmp;
__asm__ __volatile__ (" rsr %0, "__stringify(RASID)"\n\t" : "=a" (tmp));
Expand All @@ -215,7 +215,7 @@ extern inline unsigned long get_rasid_register (void)

#if ((XCHAL_MMU_ASID_INVALID == 0) && (XCHAL_MMU_ASID_KERNEL == 1))

extern inline void
static inline void
get_new_mmu_context(struct mm_struct *mm, unsigned long asid)
{
extern void flush_tlb_all(void);
Expand All @@ -234,7 +234,7 @@ get_new_mmu_context(struct mm_struct *mm, unsigned long asid)
/* XCHAL_MMU_ASID_INVALID == 0 and XCHAL_MMU_ASID_KERNEL ==1 are
really the best, but if you insist... */

extern inline int validate_asid (unsigned long asid)
static inline int validate_asid (unsigned long asid)
{
switch (asid) {
case XCHAL_MMU_ASID_INVALID:
Expand All @@ -247,7 +247,7 @@ extern inline int validate_asid (unsigned long asid)
return 1; /* valid */
}

extern inline void
static inline void
get_new_mmu_context(struct mm_struct *mm, unsigned long asid)
{
extern void flush_tlb_all(void);
Expand All @@ -274,14 +274,14 @@ get_new_mmu_context(struct mm_struct *mm, unsigned long asid)
* instance.
*/

extern inline int
static inline int
init_new_context(struct task_struct *tsk, struct mm_struct *mm)
{
mm->context = NO_CONTEXT;
return 0;
}

extern inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{
unsigned long asid = asid_cache;
Expand All @@ -301,7 +301,7 @@ extern inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
* Destroy context related info for an mm_struct that is about
* to be put to rest.
*/
extern inline void destroy_context(struct mm_struct *mm)
static inline void destroy_context(struct mm_struct *mm)
{
/* Nothing to do. */
}
Expand All @@ -310,7 +310,7 @@ extern inline void destroy_context(struct mm_struct *mm)
* After we have set current->mm to a new value, this activates
* the context for the new mm so we see the new mappings.
*/
extern inline void
static inline void
activate_mm(struct mm_struct *prev, struct mm_struct *next)
{
/* Unconditionally get a new ASID. */
Expand Down
2 changes: 1 addition & 1 deletion include/asm-xtensa/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
* Pure 2^n version of get_order
*/

extern __inline__ int get_order(unsigned long size)
static inline int get_order(unsigned long size)
{
int order;
#ifndef XCHAL_HAVE_NSU
Expand Down
4 changes: 2 additions & 2 deletions include/asm-xtensa/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@

extern struct pci_controller* pcibios_alloc_controller(void);

extern inline void pcibios_set_master(struct pci_dev *dev)
static inline void pcibios_set_master(struct pci_dev *dev)
{
/* No special bus mastering setup handling */
}

extern inline void pcibios_penalize_isa_irq(int irq)
static inline void pcibios_penalize_isa_irq(int irq)
{
/* We don't do dynamic PCI IRQ allocation */
}
Expand Down
6 changes: 3 additions & 3 deletions include/asm-xtensa/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_RW; return pt
#define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
#define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot)

extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
{
return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot));
}
Expand All @@ -278,14 +278,14 @@ static inline void update_pte(pte_t *ptep, pte_t pteval)
#endif
}

extern inline void
static inline void
set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval)
{
update_pte(ptep, pteval);
}


extern inline void
static inline void
set_pmd(pmd_t *pmdp, pmd_t pmdval)
{
*pmdp = pmdval;
Expand Down
10 changes: 5 additions & 5 deletions include/asm-xtensa/semaphore.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct semaphore {
#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)

extern inline void sema_init (struct semaphore *sem, int val)
static inline void sema_init (struct semaphore *sem, int val)
{
/*
* *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
Expand Down Expand Up @@ -79,7 +79,7 @@ asmlinkage void __up(struct semaphore * sem);

extern spinlock_t semaphore_wake_lock;

extern __inline__ void down(struct semaphore * sem)
static inline void down(struct semaphore * sem)
{
#if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
Expand All @@ -89,7 +89,7 @@ extern __inline__ void down(struct semaphore * sem)
__down(sem);
}

extern __inline__ int down_interruptible(struct semaphore * sem)
static inline int down_interruptible(struct semaphore * sem)
{
int ret = 0;
#if WAITQUEUE_DEBUG
Expand All @@ -101,7 +101,7 @@ extern __inline__ int down_interruptible(struct semaphore * sem)
return ret;
}

extern __inline__ int down_trylock(struct semaphore * sem)
static inline int down_trylock(struct semaphore * sem)
{
int ret = 0;
#if WAITQUEUE_DEBUG
Expand All @@ -117,7 +117,7 @@ extern __inline__ int down_trylock(struct semaphore * sem)
* Note! This is subtle. We jump to wake people up only if
* the semaphore was negative (== somebody was waiting on it).
*/
extern __inline__ void up(struct semaphore * sem)
static inline void up(struct semaphore * sem)
{
#if WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
Expand Down
8 changes: 4 additions & 4 deletions include/asm-xtensa/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define _XTENSA_STRING_H

#define __HAVE_ARCH_STRCPY
extern __inline__ char *strcpy(char *__dest, const char *__src)
static inline char *strcpy(char *__dest, const char *__src)
{
register char *__xdest = __dest;
unsigned long __dummy;
Expand All @@ -35,7 +35,7 @@ extern __inline__ char *strcpy(char *__dest, const char *__src)
}

#define __HAVE_ARCH_STRNCPY
extern __inline__ char *strncpy(char *__dest, const char *__src, size_t __n)
static inline char *strncpy(char *__dest, const char *__src, size_t __n)
{
register char *__xdest = __dest;
unsigned long __dummy;
Expand All @@ -60,7 +60,7 @@ extern __inline__ char *strncpy(char *__dest, const char *__src, size_t __n)
}

#define __HAVE_ARCH_STRCMP
extern __inline__ int strcmp(const char *__cs, const char *__ct)
static inline int strcmp(const char *__cs, const char *__ct)
{
register int __res;
unsigned long __dummy;
Expand All @@ -82,7 +82,7 @@ extern __inline__ int strcmp(const char *__cs, const char *__ct)
}

#define __HAVE_ARCH_STRNCMP
extern __inline__ int strncmp(const char *__cs, const char *__ct, size_t __n)
static inline int strncmp(const char *__cs, const char *__ct, size_t __n)
{
register int __res;
unsigned long __dummy;
Expand Down
10 changes: 5 additions & 5 deletions include/asm-xtensa/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ static inline int irqs_disabled(void)

#define clear_cpenable() __clear_cpenable()

extern __inline__ void __clear_cpenable(void)
static inline void __clear_cpenable(void)
{
#if XCHAL_HAVE_CP
unsigned long i = 0;
WSR_CPENABLE(i);
#endif
}

extern __inline__ void enable_coprocessor(int i)
static inline void enable_coprocessor(int i)
{
#if XCHAL_HAVE_CP
int cp;
Expand All @@ -74,7 +74,7 @@ extern __inline__ void enable_coprocessor(int i)
#endif
}

extern __inline__ void disable_coprocessor(int i)
static inline void disable_coprocessor(int i)
{
#if XCHAL_HAVE_CP
int cp;
Expand Down Expand Up @@ -123,7 +123,7 @@ do { \
* cmpxchg
*/

extern __inline__ unsigned long
static inline unsigned long
__cmpxchg_u32(volatile int *p, int old, int new)
{
__asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t"
Expand Down Expand Up @@ -173,7 +173,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
* where no register reference will cause an overflow.
*/

extern __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val)
static inline unsigned long xchg_u32(volatile int * m, unsigned long val)
{
unsigned long tmp;
__asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t"
Expand Down
Loading

0 comments on commit d99cf71

Please sign in to comment.