]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Revert "GCC4.6: Convert various empty macros to inline functions"
authorWolfgang Denk <wd@denx.de>
Tue, 4 Oct 2011 19:19:19 +0000 (21:19 +0200)
committerWolfgang Denk <wd@denx.de>
Tue, 4 Oct 2011 19:19:19 +0000 (21:19 +0200)
This reverts commit 60ce53cf9f408d9ad721f8e7a87d6a564e6d5bac.

The commit causes build breakage for a number of boards. This results
from the fact that now the arguments of debug() actually get
referenced (even if there is hope that the compiler will optimize
away the debug() call).  The obvious fix to that probem (change the
code to always declare the referenced variables and data structures)
increases the code size, and was this rejected.  So it was decided to
revert this commit until a better solution is found.

common/usb.c
common/usb_storage.c
include/common.h
include/i2c.h

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