mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
gpu/drm/radeon: use DIV_ROUND_UP macro to do calculation
Don't open-code DIV_ROUND_UP() kernel macro. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
062ccc240e
commit
b89a521814
1 changed files with 2 additions and 2 deletions
|
@ -220,7 +220,7 @@ int r600_fmt_get_nblocksx(u32 format, u32 w)
|
|||
if (bw == 0)
|
||||
return 0;
|
||||
|
||||
return (w + bw - 1) / bw;
|
||||
return DIV_ROUND_UP(w, bw);
|
||||
}
|
||||
|
||||
int r600_fmt_get_nblocksy(u32 format, u32 h)
|
||||
|
@ -234,7 +234,7 @@ int r600_fmt_get_nblocksy(u32 format, u32 h)
|
|||
if (bh == 0)
|
||||
return 0;
|
||||
|
||||
return (h + bh - 1) / bh;
|
||||
return DIV_ROUND_UP(h, bh);
|
||||
}
|
||||
|
||||
struct array_mode_checker {
|
||||
|
|
Loading…
Reference in a new issue