From patchwork Wed Feb 28 06:12:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 129924 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp657356lja; Tue, 27 Feb 2018 22:13:08 -0800 (PST) X-Google-Smtp-Source: AH8x225Ny43CfHs0HiDAgPlICQOepHKtkZxTevjxhIpDORNM6BQng8tBvwo7INqZLKi5mUklaPPd X-Received: by 2002:a17:902:7593:: with SMTP id j19-v6mr16193731pll.408.1519798388200; Tue, 27 Feb 2018 22:13:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519798388; cv=none; d=google.com; s=arc-20160816; b=rlGP9DAYevunF+CYbn3MnNH5002dgwSUL4msBgLe236mY/f3MqRN+h4a/iXEFmSLKj D4uLb6G+bQcJyy2XsnDdfmYM+Y9Iw8Le6NcFMm500PLCiz34u8zsAAcFn1/0FM2dQLuC Y5kH6JrlD27swR+85wQavRhRnTTaiO4xLPfQEjMCp+eIKYCLedaT3L3TP+bdqqeopIZs zCI+N9uqe01sz0n4t5WKwGZnPbvutGJ4mDp+h4d3DTt7fPytHPB99ypNTM4tpRkbOdS2 eEz+piLvAWaaLB7VXcNr259ztlDATC5StTM2hMYCJ6Qsxf6ym8fP8KtcViAtCpECZZef aCOQ== 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 :dkim-signature:arc-authentication-results; bh=O/5AjjI+cZbW0hkEDbTzCA+ecv25j2VLnJ0QVCt0xHA=; b=vz+FRQy2yVh0nlXyb7Tlbcxkp7pSvatkv0332vr+QVmFAGpc5hny7fNascAyO8T9Xo 47yxtyn1UlUYZgGJGEdAZHbUzW1AS0XOfNq+TOOBsT3hNwDhZcLq0cNhdo4LJmDRYpY8 Bm8goFsLjhijD+kMOEnDzndk4f/BIBvJnqH6YnbU3q6Cw4RQQKCC4Fqq6mCIfhlbgMVk hNnnKExWazxnQPlf0ezSmGBtkI0Mx5itMPieEx55ao8WhbnXbgLl6l057tvtYTi4uvMH U02Ak6/Le7L4o0poSMw5x+jwbm1QTixB0nx+61bTvSMcj79JytSGa2zuZVblhoXU7zuF y1pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V3v46pAq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c23-v6si737739plz.794.2018.02.27.22.13.07; Tue, 27 Feb 2018 22:13:08 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=V3v46pAq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751989AbeB1GNC (ORCPT + 28 others); Wed, 28 Feb 2018 01:13:02 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:38492 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbeB1GNB (ORCPT ); Wed, 28 Feb 2018 01:13:01 -0500 Received: by mail-pl0-f68.google.com with SMTP id d4-v6so947502pll.5 for ; Tue, 27 Feb 2018 22:13:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=O/5AjjI+cZbW0hkEDbTzCA+ecv25j2VLnJ0QVCt0xHA=; b=V3v46pAqsirL0M5ij7J69jyqlG98fMr6sq7XiyyYNo+JL7ImLXCJltGPuW1loL0ZoD lAOunmt00Qj9u0uon3x3SpwAmDaAJOCalWqjHyRte23j9IIaoQkGunjF9krZB6oO9182 21dW+nb7TRq6gzNpgWvPKzPxkc8x0eNHcGkgU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=O/5AjjI+cZbW0hkEDbTzCA+ecv25j2VLnJ0QVCt0xHA=; b=YL9Lt82VbP/uotmsrkvL9+Tlq96N7J7sHdyTASQVR8Ru5f0Zerz3bXYrsmT9P8SajR m5M8nmCn5+Ky0dg+/Z4tSNbqP9m45l8lSoMPpY622ORLft3QW9UKGTZiRLtyyGMAdQur nvH9WZVTJXwQevrX5ltkRHr0LM1uMRGXj4dIAXe2xvuR2ujJsSC0r54rmDaGnlnUMaGD MegxvUCn9eDynPOP/j8hiq60Qf8N8yh7ve5s1ASwHq4tSRzGt7qpQOpnAsPlPPCZN2+y /SI3v86odGH7agleGV8rSApJuX8kRMP4AuQeF3QQq+T7JCJI0C0zu+dRkiCexOffKmvU 5xVg== X-Gm-Message-State: APf1xPCMPsKYFy5YEPfiPReZBOKt2Uq/Wb80dZBy6PUMJiyXIvAn+t+U I0GFQCvoektqeeV5DNOb5143/Q== X-Received: by 2002:a17:902:5609:: with SMTP id h9-v6mr16746916pli.302.1519798380765; Tue, 27 Feb 2018 22:13:00 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id h9sm1313080pgr.78.2018.02.27.22.12.57 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Feb 2018 22:12:59 -0800 (PST) From: Baolin Wang To: john.stultz@linaro.org, arnd@arndb.de Cc: linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org Subject: [PATCH] frv: Use read_persistent_clock64() instead of read_persistent_clock() Date: Wed, 28 Feb 2018 14:12:21 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The struct timespec is not y2038 safe on 32bit systems, thus this patch converts the read_persistent_clock() to read_persistent_clock64() with using struct timespec64. We also use time64_t type to record system time by converting the mktime() to mktime64() . Signed-off-by: Baolin Wang --- arch/frv/kernel/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.7.9.5 diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c index 332e00b..5f5e90e 100644 --- a/arch/frv/kernel/time.c +++ b/arch/frv/kernel/time.c @@ -85,7 +85,7 @@ void time_divisor_init(void) } -void read_persistent_clock(struct timespec *ts) +void read_persistent_clock64(struct timespec64 *ts) { unsigned int year, mon, day, hour, min, sec; @@ -101,7 +101,7 @@ void read_persistent_clock(struct timespec *ts) if ((year += 1900) < 1970) year += 100; - ts->tv_sec = mktime(year, mon, day, hour, min, sec); + ts->tv_sec = mktime64(year, mon, day, hour, min, sec); ts->tv_nsec = 0; }