From patchwork Tue Dec 20 12:29:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 132410 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 6BA4CB6FFB for ; Tue, 20 Dec 2011 23:29:19 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E14362815C; Tue, 20 Dec 2011 13:29:17 +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 lWLvWluesC4x; Tue, 20 Dec 2011 13:29:17 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0C0F128161; Tue, 20 Dec 2011 13:29:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A960F28161 for ; Tue, 20 Dec 2011 13:29:11 +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 ZHkK11nkmqzy for ; Tue, 20 Dec 2011 13:29:09 +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.9]) by theia.denx.de (Postfix) with ESMTP id E119F2815C for ; Tue, 20 Dec 2011 13:29:08 +0100 (CET) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 5E4691C01D9B; Tue, 20 Dec 2011 13:29:04 +0100 (CET) X-Auth-Info: lKt/jKhaWZAQerax1FVcMxFsloqdYglZKOr+wY++0TQ= Received: from localhost (p4FDE723E.dip.t-dialin.net [79.222.114.62]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id 253D61C00199; Tue, 20 Dec 2011 13:29:04 +0100 (CET) From: Anatolij Gustschin To: u-boot@lists.denx.de Date: Tue, 20 Dec 2011 13:29:03 +0100 Message-Id: <1324384143-10198-1-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.7.1 Subject: [U-Boot] [PATCH] drivers/net/e1000_spi.c: Fix build warnings 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: e1000_spi.c: In function 'spi_free_slave': e1000_spi.c:115: warning: unused variable 'hw' e1000_spi.c: In function 'do_e1000_spi': e1000_spi.c:472: warning: 'checksum' may be used uninitialized in this function e1000_spi.c:472: note: 'checksum' was declared here Signed-off-by: Anatolij Gustschin Cc: Kyle Moffett Acked-by: Kyle Moffett --- drivers/net/e1000_spi.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c index 5491780..5f774f4 100644 --- a/drivers/net/e1000_spi.c +++ b/drivers/net/e1000_spi.c @@ -1,4 +1,5 @@ #include "e1000.h" +#include /*----------------------------------------------------------------------- * SPI transfer @@ -112,7 +113,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, void spi_free_slave(struct spi_slave *spi) { - struct e1000_hw *hw = e1000_hw_from_spi(spi); + __maybe_unused struct e1000_hw *hw = e1000_hw_from_spi(spi); E1000_DBG(hw->nic, "EEPROM SPI access released\n"); } @@ -469,7 +470,7 @@ static int do_e1000_spi_program(cmd_tbl_t *cmdtp, struct e1000_hw *hw, static int do_e1000_spi_checksum(cmd_tbl_t *cmdtp, struct e1000_hw *hw, int argc, char * const argv[]) { - uint16_t i, length, checksum, checksum_reg; + uint16_t i, length, checksum = 0, checksum_reg; uint16_t *buffer; boolean_t upd;