All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/7 V2] GCC4.6: Convert various empty macros to inline functions
@ 2011-09-26  0:26 Marek Vasut
  2011-09-26  0:26 ` [U-Boot] [PATCH 2/7 RESEND] GCC4.6: Remove unused "port" variable in cmd_usb.c Marek Vasut
                   ` (9 more replies)
  0 siblings, 10 replies; 51+ messages in thread
From: Marek Vasut @ 2011-09-26  0:26 UTC (permalink / raw)
  To: u-boot

Fixes problems similar to the following ones:

cmd_date.c: In function ?do_date?:
cmd_date.c:50:6: warning: variable ?old_bus? set but not used
[-Wunused-but-set-variable]

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 common/usb.c         |    4 ++--
 common/usb_storage.c |    2 +-
 include/common.h     |    4 ++--
 include/i2c.h        |    5 ++++-
 4 files changed, 9 insertions(+), 6 deletions(-)

V2: Squash warning in usb_storage.c

diff --git a/common/usb.c b/common/usb.c
index a401c09..a5f9e9f 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -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
 
 
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 16667f3..5c56918 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -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>
diff --git a/include/common.h b/include/common.h
index d244bd4..aeb2d84 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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
diff --git a/include/i2c.h b/include/i2c.h
index 8ceb4c8..323150d 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -55,7 +55,10 @@
 #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 */
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2011-10-04 20:58 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-26  0:26 [U-Boot] [PATCH 1/7 V2] GCC4.6: Convert various empty macros to inline functions Marek Vasut
2011-09-26  0:26 ` [U-Boot] [PATCH 2/7 RESEND] GCC4.6: Remove unused "port" variable in cmd_usb.c Marek Vasut
2011-09-26  3:40   ` Mike Frysinger
2011-09-26  0:26 ` [U-Boot] [PATCH 3/7] GCC4.6: Squash warning in cmd_flash.c Marek Vasut
2011-10-01 21:25   ` Wolfgang Denk
2011-09-26  0:26 ` [U-Boot] [PATCH 4/7] GCC4.6: Squash warning in cmd_nvedit.c Marek Vasut
2011-09-26  3:39   ` Mike Frysinger
2011-09-26  3:40   ` Mike Frysinger
2011-09-26 18:15   ` Simon Glass
2011-10-01 21:26   ` Wolfgang Denk
2011-09-26  0:26 ` [U-Boot] [PATCH 5/7] GCC4.6: Squash warnings in lcd.c Marek Vasut
2011-10-01 21:26   ` Wolfgang Denk
2011-09-26  0:26 ` [U-Boot] [PATCH 6/7] GCC4.6: Squash warnings in ipu_disp.c Marek Vasut
2011-10-01 21:27   ` Wolfgang Denk
2011-09-26  0:26 ` [U-Boot] [PATCH 7/7] GCC4.6: Squash warning in cmd_mem.c Marek Vasut
2011-09-26  3:41   ` Mike Frysinger
2011-09-26  7:25     ` Wolfgang Denk
2011-09-26  9:03       ` Marek Vasut
2011-09-26 16:10         ` Mike Frysinger
2011-09-26 17:31           ` Marek Vasut
2011-09-26 18:03             ` Wolfgang Denk
2011-09-26 18:29               ` Marek Vasut
2011-09-26 18:49                 ` Wolfgang Denk
2011-09-26 19:52                 ` Mike Frysinger
2011-09-26 18:05   ` Simon Glass
2011-09-26 18:24     ` Marek Vasut
2011-09-26 18:29       ` Simon Glass
2011-09-26 18:34         ` Marek Vasut
2011-09-26 19:01           ` Simon Glass
2011-09-26 19:10             ` Marek Vasut
2011-09-26 19:13               ` Simon Glass
2011-10-01 21:27   ` Wolfgang Denk
2011-09-26  2:39 ` [U-Boot] [PATCH 1/7 V2] GCC4.6: Convert various empty macros to inline functions Fabio Estevam
2011-09-26  9:04   ` Marek Vasut
2011-09-26 11:28     ` Wolfgang Denk
2011-09-26  3:41 ` Mike Frysinger
2011-09-26 17:36 ` [U-Boot] [PATCH 1/7 V3] " Marek Vasut
2011-10-01 21:20   ` Wolfgang Denk
2011-10-02 18:36     ` Wolfgang Denk
2011-10-02 19:08       ` Marek Vasut
2011-10-02 22:50         ` Marek Vasut
2011-10-03 18:32 ` [U-Boot] [PATCH 1/7 V2] " Marek Vasut
2011-10-03 18:36   ` Wolfgang Denk
2011-10-03 18:42     ` Marek Vasut
2011-10-03 22:58       ` Marek Vasut
2011-10-04 12:18     ` Marek Vasut
2011-10-04 19:06       ` Marek Vasut
2011-10-04 19:23         ` Wolfgang Denk
2011-10-04 19:46         ` Mike Frysinger
2011-10-04 20:44           ` Wolfgang Denk
2011-10-04 20:58             ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.