Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe365285 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mauro Carvalho Chehab
Browse files

media: av7110: avoid 2038 overflow in debug print



Using the deprecated do_gettimeofday() in print_time() will overflow
in 2038 on 32-bit architectures. It'sbetter to use a structure that
is safe everywhere. While we're at it, fix the missing leading zeroes
on the sub-second portion.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent b3120d2c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -347,9 +347,9 @@ static int DvbDmxFilterCallback(u8 *buffer1, size_t buffer1_len,
static inline void print_time(char *s)
{
#ifdef DEBUG_TIMING
	struct timeval tv;
	do_gettimeofday(&tv);
	printk("%s: %d.%d\n", s, (int)tv.tv_sec, (int)tv.tv_usec);
	struct timespec64 ts;
	ktime_get_real_ts64(&ts);
	printk("%s: %lld.%09ld\n", s, (s64)ts.tv_sec, ts.tv_nsec);
#endif
}