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:
Joseph Burt 2021-02-10 15:06:31 +01:00 committed by Liam Girdwood
parent a140f2f4bb
commit df899fded0
1 changed files with 1 additions and 1 deletions

View File

@ -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");
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);
config.elem_array.elems = &elem;
config.elem_array.count = 1;