Browse Source

Revert "GCC4.6: Convert various empty macros to inline functions"

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.
Wolfgang Denk 13 years ago
parent
commit
f092f15d39
4 changed files with 6 additions and 9 deletions
  1. 2 2
      common/usb.c
  2. 1 1
      common/usb_storage.c
  3. 2 2
      include/common.h
  4. 1 4
      include/i2c.h

+ 2 - 2
common/usb.c

@@ -63,7 +63,7 @@
 #ifdef	USB_DEBUG
 #ifdef	USB_DEBUG
 #define	USB_PRINTF(fmt, args...)	printf(fmt , ##args)
 #define	USB_PRINTF(fmt, args...)	printf(fmt , ##args)
 #else
 #else
-static inline void USB_PRINTF(const char *fmt, ...) {}
+#define USB_PRINTF(fmt, args...)
 #endif
 #endif
 
 
 #define USB_BUFSIZ	512
 #define USB_BUFSIZ	512
@@ -970,7 +970,7 @@ void usb_scan_devices(void)
 #ifdef	USB_HUB_DEBUG
 #ifdef	USB_HUB_DEBUG
 #define	USB_HUB_PRINTF(fmt, args...)	printf(fmt , ##args)
 #define	USB_HUB_PRINTF(fmt, args...)	printf(fmt , ##args)
 #else
 #else
-static inline void USB_HUB_PRINTF(const char *fmt, ...) {}
+#define USB_HUB_PRINTF(fmt, args...)
 #endif
 #endif
 
 
 
 

+ 1 - 1
common/usb_storage.c

@@ -63,7 +63,7 @@
 #ifdef	USB_STOR_DEBUG
 #ifdef	USB_STOR_DEBUG
 #define USB_STOR_PRINTF(fmt, args...)	printf(fmt , ##args)
 #define USB_STOR_PRINTF(fmt, args...)	printf(fmt , ##args)
 #else
 #else
-static inline void USB_STOR_PRINTF(const char *fmt, ...) {}
+#define USB_STOR_PRINTF(fmt, args...)
 #endif
 #endif
 
 
 #include <scsi.h>
 #include <scsi.h>

+ 2 - 2
include/common.h

@@ -120,8 +120,8 @@ typedef volatile unsigned char	vu_char;
 #define debug(fmt,args...)	printf (fmt ,##args)
 #define debug(fmt,args...)	printf (fmt ,##args)
 #define debugX(level,fmt,args...) if (DEBUG>=level) printf(fmt,##args);
 #define debugX(level,fmt,args...) if (DEBUG>=level) printf(fmt,##args);
 #else
 #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 */
 #endif	/* DEBUG */
 
 
 #ifdef DEBUG
 #ifdef DEBUG

+ 1 - 4
include/i2c.h

@@ -55,10 +55,7 @@
 #else
 #else
 #define CONFIG_SYS_MAX_I2C_BUS		1
 #define CONFIG_SYS_MAX_I2C_BUS		1
 #define I2C_GET_BUS()		0
 #define I2C_GET_BUS()		0
-static inline int I2C_SET_BUS(unsigned int bus)
-{
-	return 0;
-}
+#define I2C_SET_BUS(a)
 #endif
 #endif
 
 
 /* define the I2C bus number for RTC and DTT if not already done */
 /* define the I2C bus number for RTC and DTT if not already done */