Re: gpu: drm: msm: use div64_u64() instead of do_div()

2022-02-10 Thread Dmitry Baryshkov
On 10/02/2022 01:17, Dmitry Baryshkov wrote: On 09/02/2022 11:37, Qing Wang wrote: From: Wang Qing do_div() does a 64-by-32 division. When the divisor is u64, do_div() truncates it to 32 bits, this means it can test non-zero and be truncated to zero for division. fix do_div.cocci warning: do_

Re: gpu: drm: msm: use div64_u64() instead of do_div()

2022-02-09 Thread Dmitry Baryshkov
On 09/02/2022 11:37, Qing Wang wrote: From: Wang Qing do_div() does a 64-by-32 division. When the divisor is u64, do_div() truncates it to 32 bits, this means it can test non-zero and be truncated to zero for division. fix do_div.cocci warning: do_div() does a 64-by-32 division, please conside

[PATCH] gpu: drm: msm: use div64_u64() instead of do_div()

2022-02-09 Thread Qing Wang
From: Wang Qing do_div() does a 64-by-32 division. When the divisor is u64, do_div() truncates it to 32 bits, this means it can test non-zero and be truncated to zero for division. fix do_div.cocci warning: do_div() does a 64-by-32 division, please consider using div64_u64 instead. Signed-off-b