Skip to content
Commit 038fcdaf authored by Wang Qing's avatar Wang Qing Committed by David S. Miller
Browse files

net: ethernet: cavium: use div64_u64() instead of do_div()



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-by: default avatarWang Qing <wangqing@vivo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 237d20c2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment