From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751896AbbCVRsy (ORCPT ); Sun, 22 Mar 2015 13:48:54 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:62090 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751752AbbCVRsv (ORCPT ); Sun, 22 Mar 2015 13:48:51 -0400 From: Arnd Bergmann Organization: Linaro Ltd To: Richard Cochran Subject: Re: [PATCH net-next V2 20/23] ptp: dp83640: convert to the 64 bit get/set time methods. Date: Sun, 22 Mar 2015 18:48:02 +0100 User-Agent: KMail/1.12.2 (Linux/3.8.0-35-generic; KDE/4.3.2; x86_64; ; ) Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Amir Vadai , Ariel Elior , 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 , Stefan =?iso-8859-1?q?S=F8rensen?= , Thomas Gleixner , Tom Lendacky References: <201503220336.31836.arnd@linaro.org> <20150322072935.GB4254@localhost.localdomain> In-Reply-To: <20150322072935.GB4254@localhost.localdomain> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201503221848.02226.arnd@linaro.org> X-Provags-ID: V03:K0:nBey7pfJKVz7gTuWPUSBzbg87LnzQYUF+pE+Q4FMWpoMgl+kyIT dA7Owf93Vz43T1jLV9T/ddbDRtS29HkkGk/ibjpwqkPA74RKd+qTa809A4p6pX+4cEVUGF2 hzZPGkSmlVbnlbgPISHM/Tuc1MITrz0hDzLlJTxrGynIFx9E3FY3zj3ToU5G7CX3ll2zSV8 W47nuK06Q6dn6CIY+qikg== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sunday 22 March 2015, Richard Cochran wrote: > On Sun, Mar 22, 2015 at 03:36:31AM +0100, Arnd Bergmann wrote: > > On Saturday 21 March 2015, Richard Cochran wrote: > > > mutex_lock(&clock->extreg_lock); > > > > > > - err = tdr_write(1, phydev, ts, PTP_LOAD_CLK); > > > + err = tdr_write(1, phydev, &ts, PTP_LOAD_CLK); > > > > > > mutex_unlock(&clock->extreg_lock); > > > > I don't see the change to the tdr_write() function that changes the > > argument from 'struct timespec ts' to 'struct timespec64 *', so this > > looks wrong to me. > > There is a 'ts64' parameter, converted to 'ts' beforehand. > Ok, got it. The code looks correct then, though I'd like to see the use of 'timespec' pushed out as far as possible. How about changing the type for tdr_write() as well here? tdr_write() itself should be fine until 2106, as it writes an unsigned number, but it's probably good to document that inside of that function. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH net-next V2 20/23] ptp: dp83640: convert to the 64 bit get/set time methods. Date: Sun, 22 Mar 2015 18:48:02 +0100 Message-ID: <201503221848.02226.arnd@linaro.org> References: <201503220336.31836.arnd@linaro.org> <20150322072935.GB4254@localhost.localdomain> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Amir Vadai , Ariel Elior , 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 , Stefan =?iso-8859-1?q?S=F8rensen?= Return-path: In-Reply-To: <20150322072935.GB4254@localhost.localdomain> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Sunday 22 March 2015, Richard Cochran wrote: > On Sun, Mar 22, 2015 at 03:36:31AM +0100, Arnd Bergmann wrote: > > On Saturday 21 March 2015, Richard Cochran wrote: > > > mutex_lock(&clock->extreg_lock); > > > > > > - err = tdr_write(1, phydev, ts, PTP_LOAD_CLK); > > > + err = tdr_write(1, phydev, &ts, PTP_LOAD_CLK); > > > > > > mutex_unlock(&clock->extreg_lock); > > > > I don't see the change to the tdr_write() function that changes the > > argument from 'struct timespec ts' to 'struct timespec64 *', so this > > looks wrong to me. > > There is a 'ts64' parameter, converted to 'ts' beforehand. > Ok, got it. The code looks correct then, though I'd like to see the use of 'timespec' pushed out as far as possible. How about changing the type for tdr_write() as well here? tdr_write() itself should be fine until 2106, as it writes an unsigned number, but it's probably good to document that inside of that function. Arnd