From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751632AbbCUVTe (ORCPT ); Sat, 21 Mar 2015 17:19:34 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:34617 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751314AbbCUVTb (ORCPT ); Sat, 21 Mar 2015 17:19:31 -0400 Date: Sat, 21 Mar 2015 22:19:24 +0100 From: Richard Cochran To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, 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 , Stefan =?iso-8859-1?Q?S=F8rensen?= , Thomas Gleixner , Tom Lendacky Subject: Re: [RFC net-next 22/22] ptp: remove 32 bit get/set methods. Message-ID: <20150321211924.GA6322@localhost.localdomain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 21, 2015 at 09:59:52PM +0100, Richard Cochran wrote: > diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c > index 296b0ec..2665360 100644 > --- a/drivers/ptp/ptp_clock.c > +++ b/drivers/ptp/ptp_clock.c > @@ -107,13 +107,21 @@ static int ptp_clock_getres(struct posix_clock *pc, struct timespec *tp) > static int ptp_clock_settime(struct posix_clock *pc, const struct timespec *tp) > { > struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); > - return ptp->info->settime(ptp->info, tp); > + struct timespec64 ts = timespec_to_timespec64(*tp); > + > + return ptp->info->settime64(ptp->info, &ts); > } > > static int ptp_clock_gettime(struct posix_clock *pc, struct timespec *tp) > { > struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); > - return ptp->info->gettime(ptp->info, tp); > + struct timespec64 ts; > + int err; > + > + err = ptp->info->gettime64(ptp->info, &ts); > + if (!err) > + *tp = timespec64_to_timespec(ts); > + return err; > } Oops, both of these functions should have started using the new methods *before* migrating the drivers. Will fix in V2. Thanks, Richard