]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
GCC4.6: Convert various empty macros to inline functions
authorMarek Vasut <marek.vasut@gmail.com>
Mon, 26 Sep 2011 17:36:19 +0000 (19:36 +0200)
committerWolfgang Denk <wd@denx.de>
Sat, 1 Oct 2011 21:25:18 +0000 (23:25 +0200)
Fix the following gcc4.6 problems:

cmd_date.c: In function ‘do_date’:
cmd_date.c:50:6: warning: variable ‘old_bus’ set but not used
[-Wunused-but-set-variable]
asix.c: In function ‘asix_init’:
asix.c:317:6: warning: variable ‘rx_ctl’ set but not used
[-Wunused-but-set-variable]
usb.c: In function ‘usb_parse_config’:
usb.c:331:17: warning: variable ‘ch’ set but not used
[-Wunused-but-set-variable]
usb.c: In function ‘usb_hub_port_connect_change’:
usb.c:1123:29: warning: variable ‘portchange’ set but not used
[-Wunused-but-set-variable]
usb.c: In function ‘usb_hub_configure’:
usb.c:1183:25: warning: variable ‘hubsts’ set but not used
[-Wunused-but-set-variable]
usb_storage.c: In function ‘usb_stor_CB_reset’:
usb_storage.c:466:6: warning: variable ‘result’ set but not used
[-Wunused-but-set-variable]

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
common/usb.c
common/usb_storage.c
include/common.h
include/i2c.h

index a401c0919878b5801a947c8992b60ae331e799b0..a5f9e9f5b058df027957cf7788f1466e457ffc13 100644 (file)
@@ -63,7 +63,7 @@
 #ifdef USB_DEBUG
 #define        USB_PRINTF(fmt, args...)        printf(fmt , ##args)
 #else
-#define USB_PRINTF(fmt, args...)
+static inline void USB_PRINTF(const char *fmt, ...) {}
 #endif
 
 #define USB_BUFSIZ     512
@@ -970,7 +970,7 @@ void usb_scan_devices(void)
 #ifdef USB_HUB_DEBUG
 #define        USB_HUB_PRINTF(fmt, args...)    printf(fmt , ##args)
 #else
-#define USB_HUB_PRINTF(fmt, args...)
+static inline void USB_HUB_PRINTF(const char *fmt, ...) {}
 #endif
 
 
index 16667f3948253d2b42d0101fbac6f3cc97fb1cf1..5c56918e260f705cba066992d7f6dd867afca62a 100644 (file)
@@ -63,7 +63,7 @@
 #ifdef USB_STOR_DEBUG
 #define USB_STOR_PRINTF(fmt, args...)  printf(fmt , ##args)
 #else
-#define USB_STOR_PRINTF(fmt, args...)
+static inline void USB_STOR_PRINTF(const char *fmt, ...) {}
 #endif
 
 #include <scsi.h>
index d244bd40b5bc5b12d2e6bfd9831156a92c7eb525..aeb2d8436b677235c7c50991c8c0dd2770633c0c 100644 (file)
@@ -120,8 +120,8 @@ typedef volatile unsigned char      vu_char;
 #define debug(fmt,args...)     printf (fmt ,##args)
 #define debugX(level,fmt,args...) if (DEBUG>=level) printf(fmt,##args);
 #else
-#define debug(fmt,args...)
-#define debugX(level,fmt,args...)
+static inline void debug(const char *fmt, ...) {}
+static inline void debugX(int level, const char *fmt, ...) {}
 #endif /* DEBUG */
 
 #ifdef DEBUG
index 8ceb4c852149425c91377dc2a8d56e2bfd7c6c5a..323150ded9ebe349d6b78fb47f0df1a793f81412 100644 (file)
 #else
 #define CONFIG_SYS_MAX_I2C_BUS         1
 #define I2C_GET_BUS()          0
-#define I2C_SET_BUS(a)
+static inline int I2C_SET_BUS(unsigned int bus)
+{
+       return 0;
+}
 #endif
 
 /* define the I2C bus number for RTC and DTT if not already done */