lkml.org 
[lkml]   [2018]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] drm: i915: remove timeval users
On Mon, Nov 6, 2017 at 1:29 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Arnd Bergmann (2017-11-03 19:53:52)
>> struct timeval is deprecated because it cannot represent times
>> past 2038. In this driver, the only use of this structure is
>> to capture debug information. This is easily changed to ktime_t,
>> which we then format as needed when printing it later.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I just noticed this hasn't gone in yet.

>> + (s64)ts.tv_sec, ts.tv_nsec / NSEC_PER_USEC);
>> + ts = ktime_to_timespec64(error->boottime);
>> + err_printf(m, "Boottime: %lld s %ld us\n",
>> + (s64)ts.tv_sec, ts.tv_nsec / NSEC_PER_USEC);
>> + ts = ktime_to_timespec64(error->uptime);
>> + err_printf(m, "Uptime: %lld s %ld us\n",
>> + (s64)ts.tv_sec, ts.tv_nsec / NSEC_PER_USEC);
>
> We could just change it to ns, nothing that I know of parses those field
> except us robots. (It's just to try and alert us in case this hang is
> likely following a device reset.)

Right, but it is used in a sysfs file, so I think it's better to not
change it. The i915_error_state_to_str() function is only called
when we actually look at the output, so it's not performance
critical.

> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Thanks! I'll resend the patch unchanged in case it helps getting
it in now.

Arnd

\
 
 \ /
  Last update: 2018-01-18 00:21    [W:0.129 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site