trivial: Fix compiler warnings in tx2 driver - Remove unused variables - Return error instead of abort during init
diff --git a/libethdrivers/src/plat/tx2/tx2.c b/libethdrivers/src/plat/tx2/tx2.c index 6349bdb..4fd42b6 100644 --- a/libethdrivers/src/plat/tx2/tx2.c +++ b/libethdrivers/src/plat/tx2/tx2.c
@@ -156,7 +156,6 @@ { struct tx2_eth_data *dev = (struct tx2_eth_data *)eth_driver->eth_data; unsigned int num_in_ring = dev->rx_size - dev->rx_remain; - bool did_rx = false; for (int i = 0; i < num_in_ring; i++) { unsigned int status = dev->rx_ring[dev->rdh].des3; @@ -186,8 +185,6 @@ { struct tx2_eth_data *dev = (struct tx2_eth_data *)driver->eth_data; volatile struct eqos_desc *tx_desc; - unsigned int num_in_ring = dev->tx_size - dev->tx_remain; - bool did_tx = false; while ((dev->tx_size - dev->tx_remain) > 0) { uint32_t i; @@ -255,7 +252,6 @@ { assert(num == 1); struct tx2_eth_data *dev = (struct tx2_eth_data *)driver->eth_data; - struct eth_device *enet = dev->eth_dev; int err; /* Ensure we have room */ if ((dev->tx_size - dev->tx_remain) > 32) {
diff --git a/libethdrivers/src/plat/tx2/uboot/dwc_eth_qos.c b/libethdrivers/src/plat/tx2/uboot/dwc_eth_qos.c index 7f57a2d..9af3c8f 100644 --- a/libethdrivers/src/plat/tx2/uboot/dwc_eth_qos.c +++ b/libethdrivers/src/plat/tx2/uboot/dwc_eth_qos.c
@@ -313,7 +313,7 @@ return 0; } -static freq_t eqos_get_tick_clk_rate_tegra186(struct eqos_priv *eqos) +static UNUSED freq_t eqos_get_tick_clk_rate_tegra186(struct eqos_priv *eqos) { return clk_get_freq(eqos->clk_slave_bus); } @@ -457,7 +457,6 @@ { struct eqos_priv *eqos = (struct eqos_priv *)dev->eth_dev; volatile struct eqos_desc *tx_desc; - int i; uint32_t ioc = 0; if (dev->tdt % 32 == 0) { ioc = EQOS_DESC2_IOC; @@ -525,22 +524,22 @@ int eqos_start(struct tx2_eth_data *d) { struct eqos_priv *eqos = (struct eqos_priv *)d->eth_dev; - int ret, i; - ulong rate; + int ret; u32 val, tx_fifo_sz, rx_fifo_sz, tqs, rqs, pbl; - uintptr_t last_rx_desc; eqos->reg_access_ok = true; uint32_t *dma_ie; ret = eqos_start_clks_tegra186(eqos); if (ret) { - ZF_LOGF("clocks start failed"); + ZF_LOGE("eqos_start_clks_tegra186 failed"); + goto err; } ret = eqos_start_resets_tegra186(eqos); if (ret) { - ZF_LOGF("clocks start failed"); + ZF_LOGE("eqos_start_resets_tegra186 failed"); + goto err_stop_clks; } udelay(10); @@ -788,7 +787,6 @@ err_stop_clks: // eqos_stop_clks_tegra186(dev); err: - ZF_LOGE("FAILED: %d", ret); return ret; }