From: Pete Zaitcev Date: Sat, 20 Feb 2010 06:55:57 +0000 (-0700) Subject: USB: usbmon: mask seconds properly in text API X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=47cb17089c059d24e5da03f2b44ee3a089075b78;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git USB: usbmon: mask seconds properly in text API The code does not implement the comment, so timestamps for long traces become confusing instead of wrapping neatly as expected. This was actually observed. Fortunately for API being in debugfs, we can just fix this instead of staying bug-for-bug compatible. Double fortunately, the stable binary API is not affected. Signed-off-by: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c index 16bfb61d24f9..31c11888ec6a 100644 --- a/drivers/usb/mon/mon_text.c +++ b/drivers/usb/mon/mon_text.c @@ -180,7 +180,7 @@ static inline unsigned int mon_get_timestamp(void) unsigned int stamp; do_gettimeofday(&tval); - stamp = tval.tv_sec & 0xFFFF; /* 2^32 = 4294967296. Limit to 4096s. */ + stamp = tval.tv_sec & 0xFFF; /* 2^32 = 4294967296. Limit to 4096s. */ stamp = stamp * 1000000 + tval.tv_usec; return stamp; }