From patchwork Wed Feb 28 06:21:24 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: 129925 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp663700lja; Tue, 27 Feb 2018 22:22:16 -0800 (PST) X-Google-Smtp-Source: AH8x225aZ5QQXhC4WrgX7bueKYgUTlNOZVvrB08taw5xFimkszRiNyibI4VgdDTM+YaK6Q4sz3Oz X-Received: by 2002:a17:902:c24:: with SMTP id 33-v6mr16873080pls.24.1519798935903; Tue, 27 Feb 2018 22:22:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519798935; cv=none; d=google.com; s=arc-20160816; b=ljTfsMJn6DoD7kr+KK63Fk598PSQOBJkB1uXOBckpZAgBAInEC/YUNbsQXlNNMRSgY sZibeXWLuy0t2vTLI2BXcbFZWVMi1ahUGJCSAau8l0RdW6X06E/TJzTWatobcYFWZdrh T02TV3UUIc4NzQllrC8ete6/ZvVq96l0g49zD+0xZxxmWBavuepbzU8dAv02ZhuQLcTo 77PXMIxwPAeB2dryNyPWL178C2vzsxFcgbiWN/nnSJYopgbKi+pT7q91kvP86Y4KK6Sh 2x/0ZD85iVIHx3bwqqYOknJAmm4tZMpV5kV17Is14xMXNiGGsSWVw9AtQlq7rvCBGNnk 5zfw== 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=gqVFp9FvVvaKoNpsBt3zSXePlAWW80Lv/EZk0/AzO0I=; b=jID3Pl0ct8nqNKeado/dVdOwhaNPQRg3vM8xTl9BAfARLNwu3qCCqXATy0cYKcIosM fxpKJi+TA8EgZqdl/YJyNWwbEpvWabuifPc8qoakMan3OeX2oJBdYGTZ7okQj4pM0Ekh t6uKz8piJgK9HZeGRNJFbZKmZH4d46zXZyflAzH7nkpUytb/7BhzOGcAkMHxvzp1o5zJ iUJ/OlvEpbmLcQMfbFKc+RgJcqBda3AyRnvfg8ZT+NezU8VolN4wveHtWAdzG18k0e4J Wxtz6mrjkdYYeDT1cXv0x+oT+VACruAWOVYWODr3JcHYU9TO4nCvHlrL9fVP7JQz4TGr aSew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FbvVS8Dr; 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 k13-v6si798055pln.380.2018.02.27.22.22.15; Tue, 27 Feb 2018 22:22:15 -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=FbvVS8Dr; 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 S1751824AbeB1GWH (ORCPT + 28 others); Wed, 28 Feb 2018 01:22:07 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:44153 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751080AbeB1GWG (ORCPT ); Wed, 28 Feb 2018 01:22:06 -0500 Received: by mail-pf0-f196.google.com with SMTP id 17so621517pfw.11 for ; Tue, 27 Feb 2018 22:22:06 -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=gqVFp9FvVvaKoNpsBt3zSXePlAWW80Lv/EZk0/AzO0I=; b=FbvVS8DrppHOtQ69YY2fN0qkmmvtYdtR+kfOFKtTS9Jnme8/C/Zl3D5banDZbGUdtb sv0LVUSlRZ0AIs8D+Z/PXmIZy7csGWZZm3I0qMRIKhBCk+rVmANoVgJ42z3DEXtiW+ve GcqOWyUsSty1aCBjvnQS3TSJNi+iEMY9iw7FY= 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=gqVFp9FvVvaKoNpsBt3zSXePlAWW80Lv/EZk0/AzO0I=; b=cqITxd7iTYCFi83jM5+SPjqD9KLqcJhkH4rOWEM9c24BVO//Lg/+SdkcFD1EnjBXJ8 AL6TLcritcT7acIEHvjzVi7/eDVuZktv6bgbLXg859Gc61DsQSAU+ehDKkjLYYELllev XT8Ju19hHK0TBh6j5lCtO0KzlB6e8fGQbTHSDeMhq6MJ3O7ACWP+hqUf/pPE0vGvrijk 8dQTQHbupTyYhrA6ZGauyTR3k+zCG9kAYK7z6D6u8Lwmmrk+S4iS3sjOW8J+qLvRyEFL y6q8QQuaOOLolyrjpI4VGmaDH4OspZtLTKJnf5niohHcdx7QbPxqRsPl6lux7ZJE/P+3 NC7A== X-Gm-Message-State: APf1xPBtPPubujqqPRLvTjxChPc8MdkOQkFq6ynafZpEKpupJmREy3QS Oe4DuamTZKSblzZP/Mg0U30bng== X-Received: by 10.98.33.4 with SMTP id h4mr16477418pfh.144.1519798925733; Tue, 27 Feb 2018 22:22:05 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id d70sm1628565pfl.119.2018.02.27.22.22.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Feb 2018 22:22:05 -0800 (PST) From: Baolin Wang To: kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, tglx@linutronix.de, pombredanne@nexb.com, arnd@arndb.de Cc: linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org Subject: [PATCH] m32r: Use read_persistent_clock64() instead of read_persistent_clock() Date: Wed, 28 Feb 2018 14:21:24 +0800 Message-Id: <872a6089557b74f6e01bf1399b84a89af2a85ee2.1519798740.git.baolin.wang@linaro.org> 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 Since struct timespec is not y2038 safe on 32bit machines, this patch converts read_persistent_clock() to read_persistent_clock64() using struct timespec64, as well as converting mktime() to mktime64(). Signed-off-by: Baolin Wang --- arch/m32r/kernel/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.7.9.5 diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c index 521749f..3ef3123 100644 --- a/arch/m32r/kernel/time.c +++ b/arch/m32r/kernel/time.c @@ -138,7 +138,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) .name = "MFT2", }; -void read_persistent_clock(struct timespec *ts) +void read_persistent_clock64(struct timespec64 *ts) { unsigned int epoch, year, mon, day, hour, min, sec; @@ -158,7 +158,7 @@ void read_persistent_clock(struct timespec *ts) epoch = 1952; year += epoch; - ts->tv_sec = mktime(year, mon, day, hour, min, sec); + ts->tv_sec = mktime64(year, mon, day, hour, min, sec); ts->tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); }