Shift exponent 32 is too large for 32-bit type 'int' so u64 values are used instead. Signed-off-by: Stephane Grosjean <s.grosjean@xxxxxxxxxxxxxxx> --- drivers/net/can/usb/peak_usb/pcan_usb_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c index 1efa39e134f4..edecb6e09c3c 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c @@ -108,10 +108,10 @@ void peak_usb_update_ts_now(struct peak_time_ref *time_ref, u32 ts_now) /* should wait at least two passes before computing */ if (ktime_to_ns(time_ref->tv_host) > 0) { - u32 delta_ts = time_ref->ts_dev_2 - time_ref->ts_dev_1; + u64 delta_ts = time_ref->ts_dev_2 - time_ref->ts_dev_1; if (time_ref->ts_dev_2 < time_ref->ts_dev_1) - delta_ts &= (1 << time_ref->adapter->ts_used_bits) - 1; + delta_ts &= (1UL << time_ref->adapter->ts_used_bits) - 1; time_ref->ts_total += delta_ts; } -- 2.34.1