From patchwork Wed Feb 28 06:44:51 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: 129927 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp680367lja; Tue, 27 Feb 2018 22:45:37 -0800 (PST) X-Google-Smtp-Source: AH8x227X9pV2KcUnMeVCUD1OYvvndrMZAZdVPSgLgY+z/HGWUGHKLUx4d1J0Y2oAqmnwfGkWiKjs X-Received: by 2002:a17:902:b903:: with SMTP id bf3-v6mr17220482plb.316.1519800336879; Tue, 27 Feb 2018 22:45:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519800336; cv=none; d=google.com; s=arc-20160816; b=lBADuuzWMEeUz83JIkairy3dH9eOUUJA6cnwRrMlmBKBdwIN4hqp/FWs9tIaYZLFEZ SbuwdIT41b410Zm4YGyHl89jl/zSFi49kTSoxhWuGeh3va/tqR9clWqpo1vnWZfswYWh +mijAwu/QpkjMar3I+pS9bCZvamKUP5qAZ8Pfg0XgLMNb/Q5DLQI9edMYkMW/xYkPrjD rWbLzOnu+XSNrZkG3ebAN3OGLu/9qA3J63ggOwip4s8R8PtNWfAMEtVNssclj6i3aO7X HhUpnknKbQbbObVZoxuyJORxinsp0JNAsgdAdgPkbebqtiYnn33hkzw9UJnIzacQzbII CQaQ== 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=BNs6eKgMvp+CuZqMpsPtxGJq+6xiJgwvCS6LI6VK4kc=; b=iRbmcYi4rb/QNDR7zOgDrcyILSd1yhKJQFg2Ic47nNoWAwpsNgMB5FxUv0k0A9rqlW Ey4w4bTEdXLT68xjlLJFLog/VjWzTi3nGLo5b49iQ35uvGvdLeTL+6jriPBHZ+jFl+ps 8u8G+dnS2KNf7hhNiLKgNDUXEY+6q17IlomE5G06goZQ21j8/Cjs9wcGPsp4shv/b/nH XaCqNrEtxMwP/cS42WlRURAgqDnSpUmsIxP10hESeZBxn0+TvkZGGoReexa1kWrDbzCW xPyA1/5etjkK30qUjQWxF79Cy72SJu+4jkwPT//Cz29e/RgktHCFz6UNvHvt6LwhIewa ClXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZbqJ0rT/; 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 y6si632028pgv.466.2018.02.27.22.45.36; Tue, 27 Feb 2018 22:45:36 -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=ZbqJ0rT/; 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 S1752021AbeB1Gpd (ORCPT + 28 others); Wed, 28 Feb 2018 01:45:33 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:37882 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750846AbeB1Gpc (ORCPT ); Wed, 28 Feb 2018 01:45:32 -0500 Received: by mail-pf0-f194.google.com with SMTP id h11so250007pfn.4 for ; Tue, 27 Feb 2018 22:45:32 -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=BNs6eKgMvp+CuZqMpsPtxGJq+6xiJgwvCS6LI6VK4kc=; b=ZbqJ0rT/HQTxTG9IHtcq/Z0VddFYBDevQLkn+lXnVLDsW9p/Q4JDH6HDu69GQE7JZo /UR/9BGJ83lLyuro+dGNmVJqSMyRd0ZTtLAAhttpgoz9rhHADLuln7bUNhMOx60J6rOR YFhJ77uvwIj2l2YegI7MORZy8q+RAP50g4uS8= 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=BNs6eKgMvp+CuZqMpsPtxGJq+6xiJgwvCS6LI6VK4kc=; b=hNQzxMLyqFHSBZq02TCoLLHN48vCaE20df0mkayMyVx2DNm22TEpEsCu8NFnLrpVCG dY9mp9lY2UTc8GpflZAEg/qLmWi6cFIQMCwXRmRyZlfj5Ou2a7EAFrtLONtKhpJQDHKR /bV1MIvr0GitgEhnS4iaTDWcSMqm78APyt2GePs/Xv3fchFcDmzMfmlyk4I08yKc8z43 CoAKnbJFvqAbsx3s10ya1gqEqwSaRMrEhGDd01QiuI8FdZWGIydMDIXk22S5JsB5fBzq 76jWL20edSS/foV6plLG5odEaFuSzknLP9wLIS+eb5q33GVSVGvwQNE6UAMQI96gNf6O irHQ== X-Gm-Message-State: APf1xPBFKFATmwOg7Im6cg1gmCUqB8i+p0fQ3wRkCP+jvzFhOm0cQ1e+ dlwd+AOaHeodZsEYWGIAt7jgxw== X-Received: by 10.98.170.13 with SMTP id e13mr16715833pff.113.1519800331896; Tue, 27 Feb 2018 22:45:31 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id s127sm1803085pfb.178.2018.02.27.22.45.26 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Feb 2018 22:45:31 -0800 (PST) From: Baolin Wang To: lftan@altera.com, arnd@arndb.de Cc: heiko@sntech.de, daniel.lezcano@linaro.org, linus.walleij@linaro.org, viresh.kumar@linaro.org, linux@roeck-us.net, nios2-dev@lists.rocketboards.org, linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org Subject: [PATCH] nios2: Use read_persistent_clock64() instead of read_persistent_clock() Date: Wed, 28 Feb 2018 14:44:51 +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/nios2/kernel/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.7.9.5 diff --git a/arch/nios2/kernel/time.c b/arch/nios2/kernel/time.c index 20e8620..ab88b6d 100644 --- a/arch/nios2/kernel/time.c +++ b/arch/nios2/kernel/time.c @@ -336,9 +336,9 @@ static int __init nios2_time_init(struct device_node *timer) return ret; } -void read_persistent_clock(struct timespec *ts) +void read_persistent_clock64(struct timespec64 *ts) { - ts->tv_sec = mktime(2007, 1, 1, 0, 0, 0); + ts->tv_sec = mktime64(2007, 1, 1, 0, 0, 0); ts->tv_nsec = 0; }