drivers/usb/class/audio.c:404: warning: static declaration of 'abs' follows non-static declaration

It seems that we have a definition of abs() in kernel.h and no implementation.


Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/usb/class/audio.c |   14 --------------
 25-akpm/include/linux/kernel.h    |    8 +++++++-
 2 files changed, 7 insertions(+), 15 deletions(-)

diff -puN include/linux/kernel.h~abs-cleanup include/linux/kernel.h
--- 25/include/linux/kernel.h~abs-cleanup	2004-06-02 18:02:29.970082544 -0700
+++ 25-akpm/include/linux/kernel.h	2004-06-02 18:02:29.975081784 -0700
@@ -61,7 +61,6 @@ asmlinkage NORET_TYPE void do_exit(long 
 	ATTRIB_NORET;
 NORET_TYPE void complete_and_exit(struct completion *, long)
 	ATTRIB_NORET;
-extern int abs(int);
 extern unsigned long simple_strtoul(const char *,char **,unsigned int);
 extern long simple_strtol(const char *,char **,unsigned int);
 extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
@@ -106,6 +105,13 @@ static inline void console_verbose(void)
 		console_loglevel = 15;
 }
 
+static inline int abs(int x)
+{
+	if (x < 0)
+		return -x;
+	return x;
+}
+
 extern void bust_spinlocks(int yes);
 extern int oops_in_progress;		/* If set, an oops, panic(), BUG() or die() is in progress */
 extern int panic_on_oops;
diff -puN drivers/usb/class/audio.c~abs-cleanup drivers/usb/class/audio.c
--- 25/drivers/usb/class/audio.c~abs-cleanup	2004-06-02 18:02:29.972082240 -0700
+++ 25-akpm/drivers/usb/class/audio.c	2004-06-02 18:02:29.978081328 -0700
@@ -212,9 +212,6 @@
 
 #define dprintk(x)
 
-#undef abs
-extern int abs(int __x) __attribute_const__; /* Shut up warning */
-
 /* --------------------------------------------------------------------- */
 
 /*
@@ -398,17 +395,6 @@ struct usb_audio_state {
 
 /* --------------------------------------------------------------------- */
 
-/* prevent picking up a bogus abs macro */
-#undef abs
-static inline int abs(int x)
-{
-        if (x < 0)
-		return -x;
-	return x;
-}
-                                
-/* --------------------------------------------------------------------- */
-
 static inline unsigned ld2(unsigned int x)
 {
 	unsigned r = 0;
_