Skip to content
Commit f51d7bf1 authored by Yangbo Lu's avatar Yangbo Lu Committed by David S. Miller
Browse files

ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation



Current calculation for diff of TMR_ADD register value may have
64-bit overflow in this code line, when long type scaled_ppm is
large.

adj *= scaled_ppm;

This patch is to resolve it by using mul_u64_u64_div_u64().

Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6ab4c311
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