Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755071AbbKXXZQ (ORCPT ); Tue, 24 Nov 2015 18:25:16 -0500 Received: from down.free-electrons.com ([37.187.137.238]:34448 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754771AbbKXXZO (ORCPT ); Tue, 24 Nov 2015 18:25:14 -0500 Date: Wed, 25 Nov 2015 00:25:12 +0100 From: Alexandre Belloni To: Joshua Clayton Cc: Alessandro Zummo , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/9] rtc-pcf2123: avoid resetting the clock if possible Message-ID: <20151124232512.GG3950@piout.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 722 Lines: 23 On 04/11/2015 at 07:36:37 -0800, Joshua Clayton wrote : > + ret = pcf2123_rtc_read_time(dev, &tm); > + if (ret < 0) > + return false; > + > + if (rtc_valid_tm(&tm) < 0) { > + dev_err(dev, "retrieved date/time is not valid.\n"); > + return false; > + } > + I would remove that test as basically, the date/time will only be valid when OSC_HAS_STOPPED is not set. -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/