summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2011-08-09 09:43:40 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:59:27 -0700
commitdae320288dcda9cae8a98b885e16ba8251294840 (patch)
treee7c7b27e2f95517c536ea210704358738d5a676a /drivers
parent0c8b6583a0a9c23c9041c790a78ec6aaeb7d69dc (diff)
Fix compiler warnings generated by gcc 4.6.
The newer compiler version is more thorough in detecting code inconsistencies, and reports warnings in many cases when building u-boot for kaen and alex. This change modifies the code to get rid of the warnings. There supposed to be no logical changes, so no testing other than building the system is being done. The files not yet upstreamed are excluded and will be submitted separately. BUG=chromium-os:18862 TEST=manual . run the following commands emerge-tegra2_kaen chromeos-u-boot emerge-x86-alex chromeos-u-boot . observe them succeed Change-Id: I4c872d84352539d24a418ba910274d08d02d26a8 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/5706 Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/nand_bbt.c5
-rw-r--r--drivers/usb/eth/asix.c9
2 files changed, 5 insertions, 9 deletions
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 521dddec278..ded652be345 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -462,7 +462,7 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
{
struct nand_chip *this = mtd->priv;
int i, chips;
- int bits, startblock, block, dir;
+ int startblock, block, dir;
int scanlen = mtd->writesize + mtd->oobsize;
int bbtblocks;
int blocktopage = this->bbt_erase_shift - this->page_shift;
@@ -486,9 +486,6 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
bbtblocks = mtd->size >> this->bbt_erase_shift;
}
- /* Number of bits for each erase block in the bbt */
- bits = td->options & NAND_BBT_NRBITS_MSK;
-
for (i = 0; i < chips; i++) {
/* Reset version information */
td->version[i] = 0;
diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index 173f2e60c03..3cc9012e155 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -241,6 +241,7 @@ static int asix_write_medium_mode(struct ueth_data *dev, u16 mode)
return ret;
}
+#ifdef DEBUG
static u16 asix_read_rx_ctl(struct ueth_data *dev)
{
__le16 v;
@@ -252,6 +253,7 @@ static u16 asix_read_rx_ctl(struct ueth_data *dev)
ret = le16_to_cpu(v);
return ret;
}
+#endif
static int asix_write_rx_ctl(struct ueth_data *dev, u16 mode)
{
@@ -313,7 +315,6 @@ static int full_init(struct eth_device *eth)
struct ueth_data *dev = (struct ueth_data *)eth->priv;
int embd_phy;
unsigned char buf[ETH_ALEN];
- u16 rx_ctl;
if (asix_write_gpio(dev,
AX_GPIO_RSE | AX_GPIO_GPO_2 | AX_GPIO_GPO2EN, 5) < 0)
@@ -341,13 +342,11 @@ static int full_init(struct eth_device *eth)
goto out_err;
}
- rx_ctl = asix_read_rx_ctl(dev);
- debug("RX_CTL is 0x%04x after software reset\n", rx_ctl);
+ debug("RX_CTL is 0x%04x after software reset\n", asix_read_rx_ctl(dev));
if (asix_write_rx_ctl(dev, 0x0000) < 0)
goto out_err;
- rx_ctl = asix_read_rx_ctl(dev);
- debug("RX_CTL is 0x%04x setting to 0x0000\n", rx_ctl);
+ debug("RX_CTL is 0x%04x setting to 0x0000\n", asix_read_rx_ctl(dev));
/* Get the MAC address */
if (asix_read_cmd(dev, AX_CMD_READ_NODE_ID,