Commit 8b08adbd authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David S. Miller

fore200e: remove the align_size field of struct chunk

There is no need for this field, as the only user of it can just use
the local size variable instead.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aff9d262
...@@ -182,7 +182,6 @@ fore200e_chunk_alloc(struct fore200e* fore200e, struct chunk* chunk, int size, i ...@@ -182,7 +182,6 @@ fore200e_chunk_alloc(struct fore200e* fore200e, struct chunk* chunk, int size, i
alignment = 0; alignment = 0;
chunk->alloc_size = size + alignment; chunk->alloc_size = size + alignment;
chunk->align_size = size;
chunk->direction = direction; chunk->direction = direction;
chunk->alloc_addr = kzalloc(chunk->alloc_size, GFP_KERNEL | GFP_DMA); chunk->alloc_addr = kzalloc(chunk->alloc_size, GFP_KERNEL | GFP_DMA);
...@@ -194,7 +193,7 @@ fore200e_chunk_alloc(struct fore200e* fore200e, struct chunk* chunk, int size, i ...@@ -194,7 +193,7 @@ fore200e_chunk_alloc(struct fore200e* fore200e, struct chunk* chunk, int size, i
chunk->align_addr = chunk->alloc_addr + offset; chunk->align_addr = chunk->alloc_addr + offset;
chunk->dma_addr = fore200e->bus->dma_map(fore200e, chunk->align_addr, chunk->align_size, direction); chunk->dma_addr = fore200e->bus->dma_map(fore200e, chunk->align_addr, size, direction);
return 0; return 0;
} }
...@@ -740,7 +739,7 @@ static void fore200e_sba_dma_sync_for_device(struct fore200e *fore200e, u32 dma_ ...@@ -740,7 +739,7 @@ static void fore200e_sba_dma_sync_for_device(struct fore200e *fore200e, u32 dma_
static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk *chunk, static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk *chunk,
int size, int nbr, int alignment) int size, int nbr, int alignment)
{ {
chunk->alloc_size = chunk->align_size = size * nbr; chunk->alloc_size = size * nbr;
/* returned chunks are page-aligned */ /* returned chunks are page-aligned */
chunk->alloc_addr = dma_alloc_coherent(fore200e->dev, chunk->alloc_size, chunk->alloc_addr = dma_alloc_coherent(fore200e->dev, chunk->alloc_size,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment