diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2011-01-25 05:18:12 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-01-31 01:27:17 -0500 |
commit | 594ece4dc0e8ac222945ef2048430600ad3c7644 (patch) | |
tree | ef7351b3603af93e5a6695d092eefbc59aedf5ab /drivers/dma/ste_dma40.c | |
parent | ac2c0a387194f45c759572b3462d1bf92ec92f00 (diff) |
dma40: remove unnecessary ALIGN()s
ALIGN(x * y, y) == x * y
ALIGN(aligned + x * y, y) == aligned + x * y
Acked-by: Per Forlin <per.forlin@stericsson.com>
Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/ste_dma40.c')
-rw-r--r-- | drivers/dma/ste_dma40.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index ce5516221581..d32a9ac86084 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
@@ -344,7 +344,7 @@ static int d40_pool_lli_alloc(struct d40_desc *d40d, | |||
344 | d40d->lli_pool.size = sizeof(d40d->lli_pool.pre_alloc_lli); | 344 | d40d->lli_pool.size = sizeof(d40d->lli_pool.pre_alloc_lli); |
345 | d40d->lli_pool.base = NULL; | 345 | d40d->lli_pool.base = NULL; |
346 | } else { | 346 | } else { |
347 | d40d->lli_pool.size = ALIGN(lli_len * 2 * align, align); | 347 | d40d->lli_pool.size = lli_len * 2 * align; |
348 | 348 | ||
349 | base = kmalloc(d40d->lli_pool.size + align, GFP_NOWAIT); | 349 | base = kmalloc(d40d->lli_pool.size + align, GFP_NOWAIT); |
350 | d40d->lli_pool.base = base; | 350 | d40d->lli_pool.base = base; |
@@ -356,13 +356,11 @@ static int d40_pool_lli_alloc(struct d40_desc *d40d, | |||
356 | if (is_log) { | 356 | if (is_log) { |
357 | d40d->lli_log.src = PTR_ALIGN((struct d40_log_lli *) base, | 357 | d40d->lli_log.src = PTR_ALIGN((struct d40_log_lli *) base, |
358 | align); | 358 | align); |
359 | d40d->lli_log.dst = PTR_ALIGN(d40d->lli_log.src + lli_len, | 359 | d40d->lli_log.dst = d40d->lli_log.src + lli_len; |
360 | align); | ||
361 | } else { | 360 | } else { |
362 | d40d->lli_phy.src = PTR_ALIGN((struct d40_phy_lli *)base, | 361 | d40d->lli_phy.src = PTR_ALIGN((struct d40_phy_lli *)base, |
363 | align); | 362 | align); |
364 | d40d->lli_phy.dst = PTR_ALIGN(d40d->lli_phy.src + lli_len, | 363 | d40d->lli_phy.dst = d40d->lli_phy.src + lli_len; |
365 | align); | ||
366 | } | 364 | } |
367 | 365 | ||
368 | return 0; | 366 | return 0; |