diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2011-08-09 09:43:40 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:59:27 -0700 |
commit | dae320288dcda9cae8a98b885e16ba8251294840 (patch) | |
tree | e7c7b27e2f95517c536ea210704358738d5a676a /drivers/usb | |
parent | 0c8b6583a0a9c23c9041c790a78ec6aaeb7d69dc (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/usb')
-rw-r--r-- | drivers/usb/eth/asix.c | 9 |
1 files changed, 4 insertions, 5 deletions
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, |