[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <733ea341-7105-e552-f562-4fb362543088@omp.ru>
Date: Thu, 18 Nov 2021 13:06:14 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: Yang Li <yang.lee@...ux.alibaba.com>, <davem@...emloft.net>
CC: <kuba@...nel.org>, <geert@...ux-m68k.org>,
<netdev@...r.kernel.org>, <linux-renesas-soc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next v2] ethernet: renesas: Use div64_ul instead of
do_div
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@...ux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
> Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>
I haven't given you this tag, yet I was going to give you one, so
it's OK finally. :-)
[...]
MBR, Sergey
Powered by blists - more mailing lists