提交 594ece4d 编写于 作者: R Rabin Vincent 提交者: Dan Williams

dma40: remove unnecessary ALIGN()s

ALIGN(x * y, y) == x * y
ALIGN(aligned + x * y, y) == aligned + x * y
Acked-by: NPer Forlin <per.forlin@stericsson.com>
Acked-by: NJonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: NRabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com>
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 ac2c0a38
...@@ -344,7 +344,7 @@ static int d40_pool_lli_alloc(struct d40_desc *d40d, ...@@ -344,7 +344,7 @@ static int d40_pool_lli_alloc(struct d40_desc *d40d,
d40d->lli_pool.size = sizeof(d40d->lli_pool.pre_alloc_lli); d40d->lli_pool.size = sizeof(d40d->lli_pool.pre_alloc_lli);
d40d->lli_pool.base = NULL; d40d->lli_pool.base = NULL;
} else { } else {
d40d->lli_pool.size = ALIGN(lli_len * 2 * align, align); d40d->lli_pool.size = lli_len * 2 * align;
base = kmalloc(d40d->lli_pool.size + align, GFP_NOWAIT); base = kmalloc(d40d->lli_pool.size + align, GFP_NOWAIT);
d40d->lli_pool.base = base; d40d->lli_pool.base = base;
...@@ -356,13 +356,11 @@ static int d40_pool_lli_alloc(struct d40_desc *d40d, ...@@ -356,13 +356,11 @@ static int d40_pool_lli_alloc(struct d40_desc *d40d,
if (is_log) { if (is_log) {
d40d->lli_log.src = PTR_ALIGN((struct d40_log_lli *) base, d40d->lli_log.src = PTR_ALIGN((struct d40_log_lli *) base,
align); align);
d40d->lli_log.dst = PTR_ALIGN(d40d->lli_log.src + lli_len, d40d->lli_log.dst = d40d->lli_log.src + lli_len;
align);
} else { } else {
d40d->lli_phy.src = PTR_ALIGN((struct d40_phy_lli *)base, d40d->lli_phy.src = PTR_ALIGN((struct d40_phy_lli *)base,
align); align);
d40d->lli_phy.dst = PTR_ALIGN(d40d->lli_phy.src + lli_len, d40d->lli_phy.dst = d40d->lli_phy.src + lli_len;
align);
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册