Messages in this thread | | | Date | Thu, 18 Nov 2021 13:06:14 +0300 | Subject | Re: [PATCH -next v2] ethernet: renesas: Use div64_ul instead of do_div | From | Sergey Shtylyov <> |
| |
On 18.11.2021 12:48, Yang Li wrote:
> do_div() does a 64-by-32 division. Here the divisor is an > unsigned long which on some platforms is 64 bit wide. So use > div64_ul instead of do_div to avoid a possible truncation. > > Eliminate the following coccicheck warning: > ./drivers/net/ethernet/renesas/ravb_main.c:2492:1-7: WARNING: > do_div() does a 64-by-32 division, please consider using div64_ul > instead. > > Reported-by: Abaci Robot <abaci@linux.alibaba.com> > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
I haven't given you this tag, yet I was going to give you one, so it's OK finally. :-)
[...]
MBR, Sergey
| |