diff options
author | Anatolij Gustschin <agust@denx.de> | 2011-12-20 02:29:03 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-12-20 23:13:49 +0100 |
commit | deb7282f9ff2b1946628240d0a103f2907b60147 (patch) | |
tree | e5c8115a9a1c2eb39215fac104b6adbaf803d6ee | |
parent | 38bd80b4856254916e886488f8e455e3bc15fdbe (diff) | |
download | u-boot-imx-deb7282f9ff2b1946628240d0a103f2907b60147.zip u-boot-imx-deb7282f9ff2b1946628240d0a103f2907b60147.tar.gz u-boot-imx-deb7282f9ff2b1946628240d0a103f2907b60147.tar.bz2 |
drivers/net/e1000_spi.c: Fix build warnings
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 <agust@denx.de>
Cc: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Acked-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
-rw-r--r-- | 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 <linux/compiler.h> /*----------------------------------------------------------------------- * 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; |