mirror of https://github.com/thesofproject/sof.git
Use DIV_ROUND_UP() macro
Replace some open coding with the new macro Signed-off-by: Joseph Burt <caseorum@gmail.com>
This commit is contained in:
parent
a140f2f4bb
commit
df899fded0
|
@ -116,7 +116,7 @@ static int ipc_get_page_descriptors(struct dma *dmac, uint8_t *page_table,
|
||||||
tr_err(&ipc_tr, "ipc_get_page_descriptors(): dma_get_attribute() failed");
|
tr_err(&ipc_tr, "ipc_get_page_descriptors(): dma_get_attribute() failed");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
elem.size = (ring->pages * 20 + 7) / 8;
|
elem.size = DIV_ROUND_UP(ring->pages * 20, 8);
|
||||||
elem.size = ALIGN_UP(elem.size, dma_copy_align);
|
elem.size = ALIGN_UP(elem.size, dma_copy_align);
|
||||||
config.elem_array.elems = &elem;
|
config.elem_array.elems = &elem;
|
||||||
config.elem_array.count = 1;
|
config.elem_array.count = 1;
|
||||||
|
|
Loading…
Reference in New Issue