From patchwork Fri Sep 23 19:09:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 116168 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 13C74B6F82 for ; Sat, 24 Sep 2011 05:10:08 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F3C5728681; Fri, 23 Sep 2011 21:10:04 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wOxPqYeeIIu2; Fri, 23 Sep 2011 21:10:04 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 025EA28677; Fri, 23 Sep 2011 21:10:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F29A828678 for ; Fri, 23 Sep 2011 21:10:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MwlzCithnKkx for ; Fri, 23 Sep 2011 21:10:00 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by theia.denx.de (Postfix) with ESMTPS id 0CBEC28676 for ; Fri, 23 Sep 2011 21:09:58 +0200 (CEST) Received: by fxd18 with SMTP id 18so3801544fxd.3 for ; Fri, 23 Sep 2011 12:09:58 -0700 (PDT) Received: by 10.223.65.141 with SMTP id j13mr5499015fai.101.1316804998344; Fri, 23 Sep 2011 12:09:58 -0700 (PDT) Received: from mashiro.ms.mff.cuni.cz (eduroam32.ms.mff.cuni.cz. [195.113.21.32]) by mx.google.com with ESMTPS id c1sm12018518fab.15.2011.09.23.12.09.57 (version=SSLv3 cipher=OTHER); Fri, 23 Sep 2011 12:09:58 -0700 (PDT) From: Marek Vasut To: u-boot@lists.denx.de Date: Fri, 23 Sep 2011 21:09:52 +0200 Message-Id: <1316804993-29406-1-git-send-email-marek.vasut@gmail.com> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 Subject: [U-Boot] [PATCH 1/2] GCC4.6: Convert various empty macros to inline functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- common/usb.c | 4 ++-- include/common.h | 4 ++-- include/i2c.h | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) 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/include/common.h b/include/common.h index d244bd4..5c6822a 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(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 */