From patchwork Mon Jun 18 15:39:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 139030 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4098616lji; Mon, 18 Jun 2018 08:40:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKjiX6eBK3WXn5gDofskiRQ5D/eMDEoK/6gnOOxHiCEBmixLKxnkyq9P865B6FURcNuQoAg X-Received: by 2002:a65:4b04:: with SMTP id r4-v6mr11289683pgq.26.1529336410816; Mon, 18 Jun 2018 08:40:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529336410; cv=none; d=google.com; s=arc-20160816; b=kWnLPrDQz5gd//xmF7M1L3dtSrExrOAyD5u7roj/UsoolL6TbXyyCOsHrQMExp3efD mf27mn6fEc3LEgdH76VEJZiphgoUpx9U3NSwVSbGQlLekni6moyI/f6r8kSB+6LKoKcb GN+MpPcfMD1TaemSS2NCTfNe2sLgfErNc0TMKZrwmcIsdPTO02NvTjjN7Ldp/98yJCf+ YKnUeigsL2g2MNkKUOqP+dRzpd8CNmFiyJ6Z/AI5N06SZdjCg3KlncgYc3/qzBNbqyAB fJBpxupHqCwB5XQpIomhpzPEAe1W6MdMqYiupC0tYPjhPoDfSOcGOLaOqET7sW4jtXm7 yrAg== 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=6ZHEf1EyerTzm0ppRaFhSN1/PpUmjqs9KqLsntcDkLE=; b=RXOjnxMj3Zi8dKXIYosnHZOBUSFp4nrHGkNMb0GnMl5HgPae0DKtb8TJp2e2C5fWJX 7dM1RCKFSJdKlj+FXG+U67UMjNmo1t2HwJ83sRrF6Akv1C70gJP15QwTT1ofdozArIFB XEKQe/NMlc7wafYfzNPECAjunr3IOxlZ+GjOrxiJi4YCu7mu0H5PmEjIDsKIWlvq9/zW OSbLMuaW3TSdynH8xhP3dNUdXfV5cfq2Hnh41vN85tjmwYHGb1v2at27aYz8ZyHxv3XQ PnCrAtAtgCykm5FBTpaA3BsKvbx3UhqkPE4GlyXu7LomlecBt6onRxEFTRd/s6+mK2ox 5REQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 s1-v6si12571214pga.296.2018.06.18.08.40.10; Mon, 18 Jun 2018 08:40:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932630AbeFRPkJ (ORCPT + 13 others); Mon, 18 Jun 2018 11:40:09 -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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;