From patchwork Wed Feb 28 06:29:12 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: 129926 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp668824lja; Tue, 27 Feb 2018 22:29:59 -0800 (PST) X-Google-Smtp-Source: AH8x227oFt6jqpDrVP51vqv6shCHg26B8qBXlBE7FL4Ieg7ZowB20EHgWiK6yuFKszUsBsHfl8+n X-Received: by 10.99.142.76 with SMTP id k73mr13312138pge.278.1519799399323; Tue, 27 Feb 2018 22:29:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519799399; cv=none; d=google.com; s=arc-20160816; b=jMnCYE9XuTYLUn2FHiVMyuW/HQCg7i3RlCB3UmD115N5HOjZHV6ByCkJ8ajf386TT7 gfj4AGxYHTHY6WWxNXePJ+0oagPZVyvBdz3aTjqwvI8fHk3nlnsDHKwYoqKQZGLbMfCc mXjPsSQ7s16BhIko6DVHw4lEJ3K9VtuEirkjoteF7koAQp52Rg2AClQpeCm8zc8AHXKe sM/NbVat3xd6ISeNUgyoKHDdFGTcB+2ORObrLnNA1W6GTW0zC4XkTfRSfNR1uNwnQbUo Xd2T/Zlz3VginUjU5w5dTuconX9DR/R2X4uOupavW65jGlJPTKvWa3iME5nPO1/R+GpO xOfA== 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=RsYtJXH5rpkQu/uB+aQizr111TXeI/mP4EiFE1mL2lc=; b=o6T3eNTff5Uqj+/TzlmiMVCWiAGN351XMf4GF15UXKtSlmp2OCf/51QodThJxgzLyN xqV/exksRpYGB55oUQoNprcaDLU//eItQyu3nq62J7Wp7nNzcVJ9KPDN1Y1HHL7kNA56 UZu9VmYEYeRPzolX4qIHvkMZyR3IUrWTo2fcRQYC3XDDMH1/ndfaDHFVWBZ8q0cQqE16 k+58ElUol+N+MJXf8zR5yJL5ExMKiV9QCu+snY75Yo+i0w5WITVdw+LAzuChl6IqA0vU 121m6khq1ElLNi0JB2qc1xTj0Q8f2IHijM3Vz1T81pRUIgYDgm81i8NkvSfF75lxCwtV +W4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cs+0Lu0K; 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 d13si617600pgu.554.2018.02.27.22.29.59; Tue, 27 Feb 2018 22:29:59 -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=Cs+0Lu0K; 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 S1751974AbeB1G34 (ORCPT + 28 others); Wed, 28 Feb 2018 01:29:56 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:39834 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751689AbeB1G3z (ORCPT ); Wed, 28 Feb 2018 01:29:55 -0500 Received: by mail-pl0-f65.google.com with SMTP id s13-v6so963323plq.6 for ; Tue, 27 Feb 2018 22:29:54 -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=RsYtJXH5rpkQu/uB+aQizr111TXeI/mP4EiFE1mL2lc=; b=Cs+0Lu0Kt3X5DtaYbFD0/NLxCT2tQyz/7o+iTqZSAxctG/OpebR5wL8XSH10Wseug4 XNcXPr/AMpeHLEO5XlW8+CnmY+7QqTJLWR8kqdnVHImYL819V3wbQBcyU6lUn3GDanee q2tSXjbrI78wAMo0ApPNGFtRNhh/m+gGuvQKg= 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=RsYtJXH5rpkQu/uB+aQizr111TXeI/mP4EiFE1mL2lc=; b=o+oeARNYhsFVY/LykciIEyw1OE6IX3UfQsgPx/u2igYZFLGh/zwGl3jCHipdZFmDEe ygI3VJrgd2jGWGzNuEl+/Hg8WMHHhJJT3Tq8nveGHwYMHWesf/h7yrVlXRUjcvV7vT/R B/ttaLHsyeUwI3S0kJqqBCH5ijZdonTNigxxL3WjlioN8SdsJCjg0OZ9LePVKoGkvtWQ FbEKQAGYJqAxr7AoNO1tWCN7T2TJswjga8XWydNI7fynUCipkQXUALJ9AleRcwrAFIiT 0vAYBTOCsbtNBbZS6sG6qtfVSbUAEBgYyVxhCvAmyZs06tARA1WAvN/qjjLsmThFfT8G owtw== X-Gm-Message-State: APf1xPDV4sAdRXmDppqnvl2mSPBD62bXxJ8qj6AzukkPNaT4RXqP4Js/ oqLS1to7NGYR+XrZyUGsTw588Q== X-Received: by 2002:a17:902:887:: with SMTP id 7-v6mr9217808pll.89.1519799394614; Tue, 27 Feb 2018 22:29:54 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id 186sm1560022pfe.2.2018.02.27.22.29.51 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Feb 2018 22:29:53 -0800 (PST) From: Baolin Wang To: geert@linux-m68k.org, mingo@kernel.org, arnd@arndb.de Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org Subject: [PATCH] m68k: Use read_persistent_clock64() instead of read_persistent_clock() Date: Wed, 28 Feb 2018 14:29:12 +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 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/m68k/kernel/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.7.9.5 diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 87160b4..8cd79c9 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c @@ -71,7 +71,7 @@ static irqreturn_t timer_interrupt(int irq, void *dummy) return IRQ_HANDLED; } -void read_persistent_clock(struct timespec *ts) +void read_persistent_clock64(struct timespec64 *ts) { struct rtc_time time; ts->tv_sec = 0; @@ -82,7 +82,7 @@ void read_persistent_clock(struct timespec *ts) if ((time.tm_year += 1900) < 1970) time.tm_year += 100; - ts->tv_sec = mktime(time.tm_year, time.tm_mon, time.tm_mday, + ts->tv_sec = mktime64(time.tm_year, time.tm_mon, time.tm_mday, time.tm_hour, time.tm_min, time.tm_sec); } }