From patchwork Sat Mar 21 21:39:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Cochran X-Patchwork-Id: 453052 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2A9691400DD for ; Sun, 22 Mar 2015 08:44:15 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=WyH/Cz4r; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbbCUVoC (ORCPT ); Sat, 21 Mar 2015 17:44:02 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:34915 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752096AbbCUVk2 (ORCPT ); Sat, 21 Mar 2015 17:40:28 -0400 Received: by wibdy8 with SMTP id dy8so16148787wib.0; Sat, 21 Mar 2015 14:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uZ73Y9TGEMyxMQZ4S5cHQfgh8DFdx9wLAvtN/KiG0Nk=; b=WyH/Cz4rAlMRmVRSgpSSidU2uXNJ74EoTnuGVLQBripK73qhT/hYzq4sQ7BJsdSamq KlG2XBx271ehgJqT39YNjYtRTge7kOwesS71dj5+r6V+FFOD6aYhHYJqn3VEq0r32fAM riL72mnSavg2+Y09fg4KlE3i5rS6UmrjK1tjiUz1QfOWRfNspVFnCBFEr0vKL3n3ORkP q0KzsXBoQ4iGcTjLF57AeGbAgFBzQyj0MvflhybVGKB9NT1ppZeQ4VmlAosco4hgCTl3 7/7YfVzrco9m4ap1FtydxPhhQ4t4laPZOuBkHi2hGFhc1ubTziRh8/wtOd5GZQ65FEVx O6Mw== X-Received: by 10.195.11.73 with SMTP id eg9mr168656669wjd.62.1426974027295; Sat, 21 Mar 2015 14:40:27 -0700 (PDT) Received: from hoboy.home (194-96-185-227.adsl.highway.telekom.at. [194.96.185.227]) by mx.google.com with ESMTPSA id k6sm4047198wia.6.2015.03.21.14.40.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Mar 2015 14:40:26 -0700 (PDT) From: Richard Cochran To: Cc: , Amir Vadai , Ariel Elior , Arnd Bergmann , Baolin Wang , Ben Hutchings , Bruce Allan , Carolyn Wyborny , Chris Metcalf , David Miller , Frank Li , Giuseppe Cavallaro , Jeff Kirsher , John Stultz , Luwei Zhou , Matthew Vick , Michael Chan , Prashant Sreedharan , Shradha Shah , Solarflare linux maintainers , Sonic Zhang , =?UTF-8?q?Stefan=20S=C3=B8rensen?= , Thomas Gleixner , Tom Lendacky Subject: [PATCH net-next V2 17/23] ptp: stmmac: convert to the 64 bit get/set time methods. Date: Sat, 21 Mar 2015 22:39:35 +0100 Message-Id: <009374d77dee7633ab0ef1a5d95182b45aaa3f18.1426973658.git.richardcochran@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This device stores the number of seconds in a 32 bit register. So more work is needed on this driver before the year 2038 comes around. Compile tested only. Signed-off-by: Richard Cochran --- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c index c5ee79d8..172f318 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c @@ -105,7 +105,7 @@ static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta) * Description: this function will read the current time from the * hardware clock and store it in @ts. */ -static int stmmac_get_time(struct ptp_clock_info *ptp, struct timespec *ts) +static int stmmac_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts) { struct stmmac_priv *priv = container_of(ptp, struct stmmac_priv, ptp_clock_ops); @@ -135,7 +135,7 @@ static int stmmac_get_time(struct ptp_clock_info *ptp, struct timespec *ts) * hardware clock. */ static int stmmac_set_time(struct ptp_clock_info *ptp, - const struct timespec *ts) + const struct timespec64 *ts) { struct stmmac_priv *priv = container_of(ptp, struct stmmac_priv, ptp_clock_ops); @@ -168,8 +168,8 @@ static struct ptp_clock_info stmmac_ptp_clock_ops = { .pps = 0, .adjfreq = stmmac_adjust_freq, .adjtime = stmmac_adjust_time, - .gettime = stmmac_get_time, - .settime = stmmac_set_time, + .gettime64 = stmmac_get_time, + .settime64 = stmmac_set_time, .enable = stmmac_enable, };