diff options
author | Mark Einon <mark.einon@gmail.com> | 2012-11-16 10:47:39 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-21 13:57:27 -0800 |
commit | 823bb2e8e1df99a28977f212975562b30f8dfd5e (patch) | |
tree | 3a68100e0cdcd5802dc6e3d72a50910f63f73534 /drivers/staging/et131x | |
parent | 1a2bd6b257592cc05e9dd3d36e5810466a075fc3 (diff) | |
download | blackbird-obmc-linux-823bb2e8e1df99a28977f212975562b30f8dfd5e.tar.gz blackbird-obmc-linux-823bb2e8e1df99a28977f212975562b30f8dfd5e.zip |
staging: et131x: Reduce indenting in et131x_rx_dma_memory_free()
This change negates an 'if' statement, allowing a large block of code
to be un-indented, making the code more readable.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/et131x')
-rw-r--r-- | drivers/staging/et131x/et131x.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index c411d13baa26..9ccd9b7f2fbe 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -2443,33 +2443,33 @@ static void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) /* Free Free Buffer Rings */ for (id = 0; id < NUM_FBRS; id++) { - if (rx_ring->fbr[id]->ring_virtaddr) { - /* First the packet memory */ - for (index = 0; index < - (rx_ring->fbr[id]->num_entries / FBR_CHUNKS); - index++) { - if (rx_ring->fbr[id]->mem_virtaddrs[index]) { + if (!rx_ring->fbr[id]->ring_virtaddr) + continue; - bufsize = (rx_ring->fbr[id]->buffsize * FBR_CHUNKS); + /* First the packet memory */ + for (index = 0; + index < (rx_ring->fbr[id]->num_entries / FBR_CHUNKS); + index++) { + if (rx_ring->fbr[id]->mem_virtaddrs[index]) { + bufsize = rx_ring->fbr[id]->buffsize * FBR_CHUNKS; - dma_free_coherent(&adapter->pdev->dev, - bufsize, - rx_ring->fbr[id]->mem_virtaddrs[index], - rx_ring->fbr[id]->mem_physaddrs[index]); + dma_free_coherent(&adapter->pdev->dev, + bufsize, + rx_ring->fbr[id]->mem_virtaddrs[index], + rx_ring->fbr[id]->mem_physaddrs[index]); - rx_ring->fbr[id]->mem_virtaddrs[index] = NULL; - } + rx_ring->fbr[id]->mem_virtaddrs[index] = NULL; } + } - bufsize = - sizeof(struct fbr_desc) * rx_ring->fbr[id]->num_entries; + bufsize = + sizeof(struct fbr_desc) * rx_ring->fbr[id]->num_entries; - dma_free_coherent(&adapter->pdev->dev, bufsize, - rx_ring->fbr[id]->ring_virtaddr, - rx_ring->fbr[id]->ring_physaddr); + dma_free_coherent(&adapter->pdev->dev, bufsize, + rx_ring->fbr[id]->ring_virtaddr, + rx_ring->fbr[id]->ring_physaddr); - rx_ring->fbr[id]->ring_virtaddr = NULL; - } + rx_ring->fbr[id]->ring_virtaddr = NULL; } /* Free Packet Status Ring */ |