staging: et131x: Remove alignment offset padding on DMA buffer allocation/free
authorMark Einon <mark.einon@gmail.com>
Fri, 16 Nov 2012 10:47:38 +0000 (10:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2012 21:57:27 +0000 (13:57 -0800)
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>
drivers/staging/et131x/et131x.c

index 82ed113f444eaa9a6d3a78fdbd7e73d6973d4ecd..c411d13baa26ea9eb9268211d6c4c675d5523cd1 100644 (file)
@@ -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,
This page took 0.050469 seconds and 5 git commands to generate.