Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752149AbdFTNlH convert rfc822-to-8bit (ORCPT ); Tue, 20 Jun 2017 09:41:07 -0400 Received: from mail1.bemta5.messagelabs.com ([195.245.231.140]:20306 "EHLO mail1.bemta5.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbdFTNlF (ORCPT ); Tue, 20 Jun 2017 09:41:05 -0400 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrKKsWRWlGSWpSXmKPExsUSt3Opse47Vc9 Ig2vnTC2WXLzKbtFxbTGTRdOhU2wW7w89Y7a4vGsOm8X+zg5GBzaPJ5suMnrsmXiSzePOtT1s Hrf/PWb2mD7vJ5PH501yAWxRrJl5SfkVCawZb9ta2Av6uCv+TzvM1MC4ibOLkYtDSGApo8SbD U+Zuhg5OdgEDCXmvXnP2MXIwSEiYCLxfHMMSA2zwD0miSX7DrCC1AgLeEs8nj6bHcQWEfCRmL d2BhOEbSTx69J5MJtFQFVi7tmjYPW8AgES/3d2sUAs62eUuPrqJTPIAk4BP4l3O7xBahgFZCW +NK5mBrGZBcQlbj2ZDzZHQkBAYsme88wQtqjEy8f/WCFseYm1v55Axe0lXt97xwIyUkJAX6Kv sRgibCixatoBqLC5xM11fBDTdSQW7P7EBmFrSyxb+JoZ4kpBiZMzn7BMYBSfheSIWUhaZiFpm YWkZQEjyypGjeLUorLUIl0jI72kosz0jJLcxMwcXUMDU73c1OLixPTUnMSkYr3k/NxNjMDorW dgYNzBuKfd7xCjJAeTkiivt7JnpBBfUn5KZUZicUZ8UWlOavEhRhkODiUJXiFgMhASLEpNT61 Iy8wBphGYtAQHj5IIb6csUJq3uCAxtzgzHSJ1ilFRSpx3qgpQQgAkkVGaB9cGS12XGGWlhHkZ GRgYhHgKUotyM0tQ5V8xinMwKgnzXgGZwpOZVwI3/RXQYiagxS+OeIAsLklESEk1MPJn7dmiv X97zHoOxz7H3XvsZUrDLy4NEizfFzVf0zx28bvvl4U+vKx31z7woDVHTr1Pkinzzp+4F8V3j6 zLLS6pvLc54/tJgQmT7YqLOo55bSv9+bFZ2PQaW7GpO6vN/Z+BiVn/nfJDtp3ZFrW9+Ov/lJW 6nDr/fN1X7S9byfb2edGbXz0ZR5VYijMSDbWYi4oTAdZ6zJ1YAwAA X-Env-Sender: stwiss.opensource@diasemi.com X-Msg-Ref: server-3.tower-179.messagelabs.com!1497966062!95226029!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked From: Steve Twiss To: Benjamin Gaignard CC: "linaro-kernel@lists.linaro.org" , "Support Opensource" , Alessandro Zummo , Alexandre Belloni , "rtc-linux@googlegroups.com" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 14/51] rtc: da9063: stop using rtc deprecated functions Thread-Topic: [PATCH 14/51] rtc: da9063: stop using rtc deprecated functions Thread-Index: AQHS6akhsDbD0arNLkeCUt37TSrhb6ItuLDA Date: Tue, 20 Jun 2017 13:41:01 +0000 Message-ID: <6ED8E3B22081A4459DAC7699F3695FB7018CD9700F@SW-EX-MBX02.diasemi.com> References: <1497951359-13334-1-git-send-email-benjamin.gaignard@linaro.org> <1497951359-13334-15-git-send-email-benjamin.gaignard@linaro.org> In-Reply-To: <1497951359-13334-15-git-send-email-benjamin.gaignard@linaro.org> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.20.26.77] x-kse-attachmentfiltering-interceptor-info: protection disabled x-kse-serverinfo: sw-ex-cashub01.diasemi.com, 9 x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: Clean, bases: 20/06/2017 12:02:00 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1401 Lines: 45 Hi Benjamin, On 20 June 2017 10:35, Benjamin Gaignard wrote: > Subject: [PATCH 14/51] rtc: da9063: stop using rtc deprecated functions Probably this subject should be "rtc: da9052" not 63. > rtc_time_to_tm() and rtc_tm_to_time() are deprecated because they > rely on 32bits variables and that will make rtc break in y2038/2016. > Stop using those two functions to safer 64bits ones. > [...] > --- > drivers/rtc/rtc-da9052.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c > index 4273377..99a0489 100644 > --- a/drivers/rtc/rtc-da9052.c > +++ b/drivers/rtc/rtc-da9052.c > @@ -104,17 +104,15 @@ static int da9052_read_alarm(struct da9052_rtc > *rtc, struct rtc_time *rtc_tm) > static int da9052_set_alarm(struct da9052_rtc *rtc, struct rtc_time *rtc_tm) > { > struct da9052 *da9052 = rtc->da9052; > - unsigned long alm_time; > + unsigned long long alm_time; > int ret; > uint8_t v[3]; > > - ret = rtc_tm_to_time(rtc_tm, &alm_time); > - if (ret != 0) > - return ret; > + alm_time = rtc_tm_to_time64(rtc_tm); But they kind of use the same functions anyway. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/rtc.h?h=v4.12-rc6#n35 And I think they they are abstracted on purpose. The DA9052/53 hardware can only handle alarms up to the end of 2063. Regards, Steve