From patchwork Sat Nov 19 12:51:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 126583 X-Patchwork-Delegate: hs@denx.de 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 81DA8B723A for ; Sat, 19 Nov 2011 23:51:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6ECF1287CC; Sat, 19 Nov 2011 13:51:45 +0100 (CET) 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 gwMzaDJ1Kibz; Sat, 19 Nov 2011 13:51:45 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7DE1528777; Sat, 19 Nov 2011 13:51:43 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CF2C928777 for ; Sat, 19 Nov 2011 13:51:41 +0100 (CET) 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 6x9ZWWOL0Cri for ; Sat, 19 Nov 2011 13:51:41 +0100 (CET) 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-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTP id 15C7528770 for ; Sat, 19 Nov 2011 13:51:39 +0100 (CET) Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 57C5A188A16A for ; Sat, 19 Nov 2011 13:54:13 +0100 (CET) X-Auth-Info: 5sOTcqWPHaX6VVeuuFN5iVTfHQrNgmhF1idGekc2ej4= Received: from localhost (p4FC46DF7.dip.t-dialin.net [79.196.109.247]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id 00E6A1C00073 for ; Sat, 19 Nov 2011 13:51:38 +0100 (CET) From: Anatolij Gustschin To: u-boot@lists.denx.de Date: Sat, 19 Nov 2011 13:51:38 +0100 Message-Id: <1321707098-14428-1-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1321399263-13826-10-git-send-email-agust@denx.de> References: <1321399263-13826-10-git-send-email-agust@denx.de> Subject: [U-Boot] [PATCH v2 09/12] drivers/i2c/davinci_i2c.c: Fix GCC 4.6 warning X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Fix: davinci_i2c.c: In function 'flush_rx': davinci_i2c.c:81:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin Acked-by: Heiko Schocher --- v2: - drop void cast since REG() is not a function call but expands to (*(volatile unsigned int *)(I2C_DDR)) and thus we don't need to indicate that return value is ignored intentionally drivers/i2c/davinci_i2c.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c index 5e3406d..a09dc76 100644 --- a/drivers/i2c/davinci_i2c.c +++ b/drivers/i2c/davinci_i2c.c @@ -78,13 +78,11 @@ static int poll_i2c_irq(int mask) void flush_rx(void) { - int dummy; - while (1) { if (!(REG(I2C_STAT) & I2C_STAT_RRDY)) break; - dummy = REG(I2C_DRR); + REG(I2C_DRR); REG(I2C_STAT) = I2C_STAT_RRDY; udelay(1000); }