public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tina Ruchandani <ruchandani.tina@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: y2038@lists.linaro.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, Wentao Xu <wentaox@codeaurora.org>,
	Thierry Reding <treding@nvidia.com>, Hai Li <hali@codeaurora.org>
Subject: [PATCH] drm/msm: Use 64-bit timekeeping
Date: Wed, 13 Apr 2016 02:44:46 -0700	[thread overview]
Message-ID: <20160413094446.GA101066@localhost> (raw)

'struct timespec' uses a 32-bit seconds which will overflow in year
2038 and beyond. This patch replaces timespec with timespec64. The
code is correct as is - the patch is merely part of a larger attempt
to remove all 32-bit timekeeping variables (timespec, timeval, time_t)
from the kernel.

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
---
 drivers/gpu/drm/msm/msm_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index c03b967..b095085 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -717,8 +717,8 @@ int msm_wait_fence(struct drm_device *dev, uint32_t fence,
 			remaining_jiffies = 0;
 		} else {
 			ktime_t rem = ktime_sub(*timeout, now);
-			struct timespec ts = ktime_to_timespec(rem);
-			remaining_jiffies = timespec_to_jiffies(&ts);
+			struct timespec64 ts = ktime_to_timespec64(rem);
+			remaining_jiffies = timespec64_to_jiffies(&ts);
 		}
 
 		if (interruptible)
-- 
2.8.0.rc3.226.g39d4020

                 reply	other threads:[~2016-04-13 12:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160413094446.GA101066@localhost \
    --to=ruchandani.tina@gmail.com \
    --cc=arnd@arndb.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hali@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=treding@nvidia.com \
    --cc=wentaox@codeaurora.org \
    --cc=y2038@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox