From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752568AbcCAI1U (ORCPT ); Tue, 1 Mar 2016 03:27:20 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:36439 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752533AbcCAI1T convert rfc822-to-8bit (ORCPT ); Tue, 1 Mar 2016 03:27:19 -0500 From: Juergen Borleis Organization: Pengutronix e.K. To: Alexandre Belloni Subject: Re: [PATCH] rtc: pcf85063: remove useless century handling Date: Tue, 1 Mar 2016 09:29:19 +0100 User-Agent: KMail/1.9.10 (enterprise35 0.20100827.1168748) Cc: rtc-linux@googlegroups.com, Alessandro Zummo , linux-kernel@vger.kernel.org, Ulrich =?iso-8859-15?q?=D6lmann?= References: <1456268728-343-1-git-send-email-alexandre.belloni@free-electrons.com> In-Reply-To: <1456268728-343-1-git-send-email-alexandre.belloni@free-electrons.com> X-KMail-QuotePrefix: > MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Message-Id: <201603010929.19210.jbe@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: jbe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 24 February 2016 00:05:28 Alexandre Belloni wrote: > pcf85063_get_datetime() tries to handle a century bit but that bit is not > documented and the final value is never used anywhere else in the kernel. > > Signed-off-by: Alexandre Belloni > --- > drivers/rtc/rtc-pcf85063.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c > index c5db231f14de..2b3b99b094b5 100644 > --- a/drivers/rtc/rtc-pcf85063.c > +++ b/drivers/rtc/rtc-pcf85063.c > @@ -31,13 +31,10 @@ > #define PCF85063_REG_MO 0x09 > #define PCF85063_REG_YR 0x0A > > -#define PCF85063_MO_C 0x80 /* century */ > - > static struct i2c_driver pcf85063_driver; > > struct pcf85063 { > struct rtc_device *rtc; > - int c_polarity; /* 0: MO_C=1 means 19xx, otherwise MO_C=1 means 20xx */ > int voltage_low; /* indicates if a low_voltage was detected */ > }; > > @@ -103,9 +100,6 @@ static int pcf85063_get_datetime(struct i2c_client > *client, struct rtc_time *tm) tm->tm_year = bcd2bin(regs[6]); > if (tm->tm_year < 70) > tm->tm_year += 100; /* assume we are in 1970...2069 */ > - /* detect the polarity heuristically. see note above. */ > - pcf85063->c_polarity = (regs[5] & PCF85063_MO_C) ? > - (tm->tm_year >= 100) : (tm->tm_year < 100); > > return rtc_valid_tm(tm); > } Reviewed-by: Juergen Borleis Tested-by: Ulrich Ölmann Regards, Juergen