staging: kpc2000: Change to use DIV_ROUND_UP

Use macro DIV_ROUND_UP instead of an equivalent sequence of operations.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nishka Dasgupta 2019-05-29 18:41:53 +05:30 committed by Greg Kroah-Hartman
parent 1d14a95b58
commit 4a932d90b1
1 changed files with 1 additions and 4 deletions

View File

@ -28,10 +28,7 @@ unsigned int count_pages(unsigned long iov_base, size_t iov_len)
static inline
unsigned int count_parts_for_sge(struct scatterlist *sg)
{
unsigned int sg_length = sg_dma_len(sg);
sg_length += (0x80000-1);
return (sg_length / 0x80000);
return DIV_ROUND_UP(sg_dma_len(sg), 0x80000);
}
/********** Transfer Helpers **********/