Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4071166imm; Mon, 18 Jun 2018 08:41:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLfr8iHZR6LJHegOput1J1SvI9qgQXcOZ+cCc4O1KFVV4lqzpzqxM8T95m5dl4Z+y2VMBOB X-Received: by 2002:a17:902:5402:: with SMTP id d2-v6mr10404890pli.38.1529336469125; Mon, 18 Jun 2018 08:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529336469; cv=none; d=google.com; s=arc-20160816; b=0m5/1cpcSDDpittqIV/FSHgYjFYbVQQ3fxqFbTUme6Mz7/BHK8WgEdQGC0YWXVTF9O X95nJlnr54/dNehDy8bAjLPM/oc7SRKHwIN3UFSWzjtd30srKaFQnnyQTrM31ETym4aB HyJDpB/2tyNJ4dy8rWtYWGvDiWTF6hcKy9wIa/D6FqFHsnoXSOfFP3FKrctHUy19W9vd FVaBp78uQlYl1yi9F702E8APATXq7TxpXCbdGDePApsamc9MJUbNljXV5j8DLQ6j5VXD hF4v38HWcDlBsCbTbHS6T4wdr3+waMNFW/otsC0DpxpRR6uVw0ceR6JDBdZC/5w8lTCK flmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=8eGBCecO7Jw923xs+N4yl+T6E5AfRXDWvzb1Tap5MK0=; b=J992k7r9SN3wXnqluYuT1ugw8fUiKNl1IOWuLVkTvtAMB/YtOQYn74ndb64Aog6U6s 3+4Qp2MetkeHu+MnMlf/vZAdgvPz5GoJ4Qvc9C37vOLdW3XuvJF5p3Xb6NEwx2hEqsrw 0cOLP9QdHJQTszlRv66kfc4bT/dUD2YF6O4oO0op4LZ7mOE0MWG0Se9bpNaWn6jnMS7G dZ0kKlOIAF3utUPHN+grIazc8pLyma8KkCPe/T4D2XBdrXCR4c6B2ip+oGv1dO1uj0N3 rY+NBDF+N0QGLaIIMwy9tgBNOAT/Cb05L5FpiOz483b7HlHJs+N7+sgJs5y2Dn6To2qq /5sw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay3-v6si14608558plb.361.2018.06.18.08.40.55; Mon, 18 Jun 2018 08:41:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933773AbeFRPkK (ORCPT + 99 others); Mon, 18 Jun 2018 11:40:10 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:35953 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932442AbeFRPkI (ORCPT ); Mon, 18 Jun 2018 11:40:08 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0LheU5-1fzLKj45qb-00mwck; Mon, 18 Jun 2018 17:40:01 +0200 From: Arnd Bergmann To: Rob Clark , David Airlie Cc: y2038@lists.linaro.org, Arnd Bergmann , Jordan Crouse , Sean Paul , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/msm: avoid using 'timespec' Date: Mon, 18 Jun 2018 17:39:42 +0200 Message-Id: <20180618153959.2169325-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:ZdeoPOOJT9Ro/rbS97oUpW3HbzobVPg+/VvV5rkRaRuMGMnh4gm GgwhoWJX4wIUnDmw7Ce3scdPv2afBkMJpoG+4nSXLLjo4TMpftpEgIIG/tDtEfrhCybqxGT GdSDEqCW+SmhhbG3w+ZCfNTvQtlnZvNJlxTwD1wOa1LC4rOp0FW60NBviUgUOIEWfy49oRn lrARVN99LjYcZESbYzn2g== X-UI-Out-Filterresults: notjunk:1;V01:K0:V4zlwv3sXTA=:LHPVF+/8LGLNnMp1dcjCgU L/6t9UtbLmAo7HIYuL7fh7pll0c4jXYr8ZlArtd97K7Ue40jsVdjPvXQ6JQMVxL9meQc6tLEL 7XdMR9uMTsOZf3cz440gsZcP7MZlAb2vO2o9h8LQUYc5jvQizebSlLPj5hpXxcIwlApN9a4Ke qRvBTkO2hpJ13AHuL35UqhmDAc4NnH0T4/zrSm/7adaGmKQssdFJMYu8cba+uJfV33wSkfEM9 YYTEIfp0JeoLUEuw+B35QBN3dY90Uq2sdLluUGyAgcicW0ajD8l2YJi5HJhCBMgoDcD0TKafg QqH9gAUG6j2fQEmkL4PJ7091l7gYtmglNwMfW2+PbpOWc9yZ1/k12laceyFLLHYNM1Y+bg+KQ 55YUh6FjqFzEwcnAQjkhBizSgCf2mip2QG83A7hF6vatS4IeF4d/C8xEWxA/V5idfblANn1WR hy0uysdosdEJPM36j0PeQwO1uwf+dpjyj0SdT5mDBNqMIe++QHCv3/Z1LgCQwTPfyQPC4DdmQ JryB0YL+GraOB8OYEwikpxwgfRz0NsML2UBTqJDf5bF9wMXoa9UCttQRQ2TzJ9zcb1DercuVa VdPmqNRmdIlZ1uLYrDm+KsWEAnPKKJOt1NU92ACH2RAQqTK9SXQ5rXZlLjOuf8cZ7nbkaa35W 9taGgiANSRgXq4L7KAVsd7iyvapR1O4l3sBV2hmj0IyZbeVs31850VtMHCCNSetOKSNE= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/msm/msm_drv.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index b2da1fbf81e0..cc8977476a41 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -353,8 +353,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; -- 2.9.0