From patchwork Sat Oct 22 00:16:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 121096 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 8BEF31007D1 for ; Sat, 22 Oct 2011 11:17:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ACDE329656; Sat, 22 Oct 2011 02:17:45 +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 27zScB0F13Fs; Sat, 22 Oct 2011 02:17:45 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 313E52965D; Sat, 22 Oct 2011 02:17:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 07D3729655 for ; Sat, 22 Oct 2011 02:17:41 +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 gNleShWzcJS7 for ; Sat, 22 Oct 2011 02:17:40 +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-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by theia.denx.de (Postfix) with ESMTPS id 9FBF529651 for ; Sat, 22 Oct 2011 02:17:40 +0200 (CEST) Received: by mail-bw0-f44.google.com with SMTP id s6so4979842bka.3 for ; Fri, 21 Oct 2011 17:17:40 -0700 (PDT) Received: by 10.223.76.27 with SMTP id a27mr27897079fak.26.1319242660463; Fri, 21 Oct 2011 17:17:40 -0700 (PDT) Received: from mashiro.kolej.mff.cuni.cz (vasut.kolej.mff.cuni.cz. [78.128.198.52]) by mx.google.com with ESMTPS id s5sm10930275fab.2.2011.10.21.17.17.39 (version=SSLv3 cipher=OTHER); Fri, 21 Oct 2011 17:17:39 -0700 (PDT) From: Marek Vasut To: u-boot@lists.denx.de Date: Sat, 22 Oct 2011 02:16:57 +0200 Message-Id: <1319242654-15534-3-git-send-email-marek.vasut@gmail.com> X-Mailer: git-send-email 1.7.6.3 In-Reply-To: <1319242654-15534-1-git-send-email-marek.vasut@gmail.com> References: <1319242654-15534-1-git-send-email-marek.vasut@gmail.com> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 02/39] GCC4.6: Squash warnings in common/usb.c 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 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] Signed-off-by: Marek Vasut Cc: Wolfgang Denk Cc: Simon Glass Cc: Mike Frysinger --- common/usb.c | 21 +++++++-------------- 1 files changed, 7 insertions(+), 14 deletions(-) diff --git a/common/usb.c b/common/usb.c index 2cd50db..bed5116 100644 --- a/common/usb.c +++ b/common/usb.c @@ -56,16 +56,16 @@ #endif #ifdef DEBUG -#define USB_DEBUG -#define USB_HUB_DEBUG -#endif - -#ifdef USB_DEBUG -#define USB_PRINTF(fmt, args...) printf(fmt , ##args) +#define USB_DEBUG 1 +#define USB_HUB_DEBUG 1 #else -#define USB_PRINTF(fmt, args...) +#define USB_DEBUG 0 +#define USB_HUB_DEBUG 0 #endif +#define USB_PRINTF(fmt, args...) debug_cond(USB_DEBUG, fmt, ##args) +#define USB_HUB_PRINTF(fmt, args...) debug_cond(USB_HUB_DEBUG, fmt, ##args) + #define USB_BUFSIZ 512 static struct usb_device usb_dev[USB_MAX_DEVICE]; @@ -968,13 +968,6 @@ void usb_scan_devices(void) * Probes device for being a hub and configurate it */ -#ifdef USB_HUB_DEBUG -#define USB_HUB_PRINTF(fmt, args...) printf(fmt , ##args) -#else -#define USB_HUB_PRINTF(fmt, args...) -#endif - - static struct usb_hub_device hub_dev[USB_MAX_HUB]; static int usb_hub_index;