aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/et131x
diff options
context:
space:
mode:
authorMark Einon <mark.einon@gmail.com>2012-11-16 10:47:38 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-21 13:57:27 -0800
commit1a2bd6b257592cc05e9dd3d36e5810466a075fc3 (patch)
treef05a93f8ab2263d9b7180e22cfa92db4c12f5859 /drivers/staging/et131x
parent15ffde4d36c30d81cd04a154960608486a1464f4 (diff)
staging: et131x: Remove alignment offset padding on DMA buffer allocation/free
This padding was used to align buffers to a 4k boundary when returned from dma_alloc_coherent(). As the buffers are already 4k aligned, and the alignment no longer performed, the padding is not needed. 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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 82ed113f444..c411d13baa2 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -2291,8 +2291,7 @@ static int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
for (id = 0; id < NUM_FBRS; id++) {
/* Allocate an area of memory for Free Buffer Ring */
- bufsize = (sizeof(struct fbr_desc) *
- rx_ring->fbr[id]->num_entries) + 0xfff;
+ bufsize = (sizeof(struct fbr_desc) * rx_ring->fbr[id]->num_entries);
rx_ring->fbr[id]->ring_virtaddr =
dma_alloc_coherent(&adapter->pdev->dev,
bufsize,
@@ -2463,8 +2462,7 @@ static void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
}
bufsize =
- (sizeof(struct fbr_desc) * rx_ring->fbr[id]->num_entries) +
- 0xfff;
+ sizeof(struct fbr_desc) * rx_ring->fbr[id]->num_entries;
dma_free_coherent(&adapter->pdev->dev, bufsize,
rx_ring->fbr[id]->ring_virtaddr,