From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752046AbbE1GlB (ORCPT ); Thu, 28 May 2015 02:41:01 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:35242 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751082AbbE1Gkx (ORCPT ); Thu, 28 May 2015 02:40:53 -0400 Message-ID: <5566B86F.7030209@telliq.com> Date: Thu, 28 May 2015 08:40:47 +0200 From: Jan Kardell Organization: TelliQ AB User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1 MIME-Version: 1.0 To: Alexandre Belloni CC: Alessandro Zummo , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, Vincent Donnefort , Dan Carpenter , oen@telliq.com Subject: Re: [PATCH v2] rtc: pcf8563 fix: return -EINVAL if we read an invalid time. References: <1432730896-13423-1-git-send-email-jan.kardell@telliq.com> <20150527185352.GJ2185@piout.net> In-Reply-To: <20150527185352.GJ2185@piout.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alexandre Belloni skrev: > Hi, > > On 27/05/2015 at 14:48:16 +0200, Jan Kardell wrote : >> @@ -204,6 +204,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm) >> pcf8563->voltage_low = 1; >> dev_info(&client->dev, > Aren't dev_err or dev_warn more appropriate? You used dev_err in your > first patch, what made you change your mind? Your comment to the first patch. But I interpreted it to broadly. I'll change it back to dev_err. > >> "low voltage detected, date/time is not reliable.\n"); >> + return -EINVAL; >> } >> >> dev_dbg(&client->dev,