Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1362670

Re: [Y2038] [PATCH] prism54: isl_38xx: Replace 'struct timeval'

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [Y2038] [PATCH] prism54: isl_38xx: Replace 'struct timeval'
Date 2016-03-22 13:00 +0100
Message-ID <rft8B-3Pc-3@gated-at.bofh.it> (permalink)
References <rfrgv-2yM-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tuesday 22 March 2016 02:55:22 Tina Ruchandani wrote:
> Truly fixing this would 
> require changing the debug print to print more than 8 digits and using 
> a different specifier from %li.

Why not just change it to %lli, and a cast to s64? I don't think the
format string or the number of digits is important here because it's just
debug output that is normally disabled.

I also see an existing bug in the format string: "%08li.%08li" means we
end up printing a six digit microsecond value with two leading zeros,
which is rather confusing. I think using "%lld.%06ld" would be best
here, or possibly "%lld.%09ld" to print the whole nanoseconds so we
can skip the division.

	Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] prism54: isl_38xx: Replace 'struct timeval' Tina Ruchandani <ruchandani.tina@gmail.com> - 2016-03-22 11:00 +0100
  Re: [Y2038] [PATCH] prism54: isl_38xx: Replace 'struct timeval' Arnd Bergmann <arnd@arndb.de> - 2016-03-22 13:00 +0100

csiph-web