microblaze: Fix C99/gnu99 compatiblity for inline functions

'extern inline' is not portable across various C standards. To ensure
compatiblity with various standards/compilers change the functions to
static inline. This is a portable construct and serves as a comparable
definition to 'extern inline' from the gnu90 standard.

Additionally remove the function prototypes as they are not required due
to the functions being declared static and functions are correctly
ordered based on dependence.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Tom Rini <trini@konsulko.com>
Acked-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
diff --git a/arch/microblaze/include/asm/bitops.h b/arch/microblaze/include/asm/bitops.h
index 178c94f..2cab2ac 100644
--- a/arch/microblaze/include/asm/bitops.h
+++ b/arch/microblaze/include/asm/bitops.h
@@ -14,38 +14,14 @@
 
 #ifdef __KERNEL__
 /*
- * Function prototypes to keep gcc -Wall happy
- */
-
-/*
  * The __ functions are not atomic
  */
 
-extern void set_bit(int nr, volatile void *addr);
-extern void __set_bit(int nr, volatile void *addr);
-
-extern void clear_bit(int nr, volatile void *addr);
-#define __clear_bit(nr, addr) clear_bit(nr, addr)
-#define PLATFORM__CLEAR_BIT
-
-extern void change_bit(int nr, volatile void *addr);
-extern void __change_bit(int nr, volatile void *addr);
-extern int test_and_set_bit(int nr, volatile void *addr);
-extern int __test_and_set_bit(int nr, volatile void *addr);
-extern int test_and_clear_bit(int nr, volatile void *addr);
-extern int __test_and_clear_bit(int nr, volatile void *addr);
-extern int test_and_change_bit(int nr, volatile void *addr);
-extern int __test_and_change_bit(int nr, volatile void *addr);
-extern int __constant_test_bit(int nr, const volatile void *addr);
-extern int __test_bit(int nr, volatile void *addr);
-extern int find_first_zero_bit(void *addr, unsigned size);
-extern int find_next_zero_bit(void *addr, int size, int offset);
-
 /*
  * ffz = Find First Zero in word. Undefined if no zero exists,
  * so code should check against ~0UL first..
  */
-extern inline unsigned long ffz(unsigned long word)
+static inline unsigned long ffz(unsigned long word)
 {
 	unsigned long result = 0;
 
@@ -57,7 +33,7 @@
 }
 
 
-extern inline void set_bit(int nr, volatile void *addr)
+static inline void set_bit(int nr, volatile void *addr)
 {
 	int	* a = (int *) addr;
 	int	mask;
@@ -70,7 +46,7 @@
 	restore_flags(flags);
 }
 
-extern inline void __set_bit(int nr, volatile void *addr)
+static inline void __set_bit(int nr, volatile void *addr)
 {
 	int	* a = (int *) addr;
 	int	mask;
@@ -87,7 +63,7 @@
 #define smp_mb__before_clear_bit()	barrier()
 #define smp_mb__after_clear_bit()	barrier()
 
-extern inline void clear_bit(int nr, volatile void *addr)
+static inline void clear_bit(int nr, volatile void *addr)
 {
 	int	* a = (int *) addr;
 	int	mask;
@@ -100,7 +76,10 @@
 	restore_flags(flags);
 }
 
+#define __clear_bit(nr, addr) clear_bit(nr, addr)
+#define PLATFORM__CLEAR_BIT
+
-extern inline void change_bit(int nr, volatile void *addr)
+static inline void change_bit(int nr, volatile void *addr)
 {
 	int mask;
 	unsigned long flags;
@@ -113,7 +92,7 @@
 	restore_flags(flags);
 }
 
-extern inline void __change_bit(int nr, volatile void *addr)
+static inline void __change_bit(int nr, volatile void *addr)
 {
 	int mask;
 	unsigned long *ADDR = (unsigned long *) addr;
@@ -123,7 +102,7 @@
 	*ADDR ^= mask;
 }
 
-extern inline int test_and_set_bit(int nr, volatile void *addr)
+static inline int test_and_set_bit(int nr, volatile void *addr)
 {
 	int	mask, retval;
 	volatile unsigned int *a = (volatile unsigned int *) addr;
@@ -139,7 +118,7 @@
 	return retval;
 }
 
-extern inline int __test_and_set_bit(int nr, volatile void *addr)
+static inline int __test_and_set_bit(int nr, volatile void *addr)
 {
 	int	mask, retval;
 	volatile unsigned int *a = (volatile unsigned int *) addr;
@@ -151,7 +130,7 @@
 	return retval;
 }
 
-extern inline int test_and_clear_bit(int nr, volatile void *addr)
+static inline int test_and_clear_bit(int nr, volatile void *addr)
 {
 	int	mask, retval;
 	volatile unsigned int *a = (volatile unsigned int *) addr;
@@ -167,7 +146,7 @@
 	return retval;
 }
 
-extern inline int __test_and_clear_bit(int nr, volatile void *addr)
+static inline int __test_and_clear_bit(int nr, volatile void *addr)
 {
 	int	mask, retval;
 	volatile unsigned int *a = (volatile unsigned int *) addr;
@@ -179,7 +158,7 @@
 	return retval;
 }
 
-extern inline int test_and_change_bit(int nr, volatile void *addr)
+static inline int test_and_change_bit(int nr, volatile void *addr)
 {
 	int	mask, retval;
 	volatile unsigned int *a = (volatile unsigned int *) addr;
@@ -195,7 +174,7 @@
 	return retval;
 }
 
-extern inline int __test_and_change_bit(int nr, volatile void *addr)
+static inline int __test_and_change_bit(int nr, volatile void *addr)
 {
 	int	mask, retval;
 	volatile unsigned int *a = (volatile unsigned int *) addr;
@@ -210,12 +189,12 @@
 /*
  * This routine doesn't need to be atomic.
  */
-extern inline int __constant_test_bit(int nr, const volatile void *addr)
+static inline int __constant_test_bit(int nr, const volatile void *addr)
 {
 	return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
 }
 
-extern inline int __test_bit(int nr, volatile void *addr)
+static inline int __test_bit(int nr, volatile void *addr)
 {
 	int	* a = (int *) addr;
 	int	mask;
@@ -233,7 +212,7 @@
 #define find_first_zero_bit(addr, size) \
 	find_next_zero_bit((addr), (size), 0)
 
-extern inline int find_next_zero_bit(void *addr, int size, int offset)
+static inline int find_next_zero_bit(void *addr, int size, int offset)
 {
 	unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
 	unsigned long result = offset & ~31UL;
@@ -279,7 +258,7 @@
 #define hweight8(x) generic_hweight8(x)
 
 
-extern inline int ext2_set_bit(int nr, volatile void *addr)
+static inline int ext2_set_bit(int nr, volatile void *addr)
 {
 	int		mask, retval;
 	unsigned long	flags;
@@ -294,7 +273,7 @@
 	return retval;
 }
 
-extern inline int ext2_clear_bit(int nr, volatile void *addr)
+static inline int ext2_clear_bit(int nr, volatile void *addr)
 {
 	int		mask, retval;
 	unsigned long	flags;
@@ -309,7 +288,7 @@
 	return retval;
 }
 
-extern inline int ext2_test_bit(int nr, const volatile void *addr)
+static inline int ext2_test_bit(int nr, const volatile void *addr)
 {
 	int			mask;
 	const volatile unsigned char	*ADDR = (const unsigned char *) addr;