diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-05-29 17:16:06 +0300 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-12-18 20:07:32 +0300 |
commit | 6cedb8b377bba6520508399b74754b9a0ca06edf (patch) | |
tree | 023ecedbfacf2a3891a7d02439840e4ebb95a761 /drivers/gpu/drm/msm/msm_drv.h | |
parent | 4ddfc3dc60a243e9d70e2de0356563c8b547fbfc (diff) | |
download | linux-6cedb8b377bba6520508399b74754b9a0ca06edf.tar.xz |
drm/msm: avoid using 'timespec'
The timespec structure and associated interfaces are deprecated and will
be removed in the future because of the y2038 overflow.
The use of ktime_to_timespec() in timeout_to_jiffies() does not
suffer from that overflow, but is easy to avoid by just converting
the ktime_t into jiffies directly.
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_drv.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_drv.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index 71547e756e29..740bf7c70d8f 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -454,8 +454,7 @@ static inline unsigned long timeout_to_jiffies(const ktime_t *timeout) remaining_jiffies = 0; } else { ktime_t rem = ktime_sub(*timeout, now); - struct timespec ts = ktime_to_timespec(rem); - remaining_jiffies = timespec_to_jiffies(&ts); + remaining_jiffies = ktime_divns(rem, NSEC_PER_SEC / HZ); } return remaining_jiffies; |