From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kenneth Heitke Subject: Re: [PATCH V3] drivers: rtc: Add support for Qualcomm PMIC8xxx RTC Date: Thu, 26 May 2011 16:22:24 -0600 Message-ID: <4DDED2A0.2070109@codeaurora.org> References: <1304574535-23710-1-git-send-email-aghayal@codeaurora.org> <1306386935-8806-1-git-send-email-aghayal@codeaurora.org> <4DDE8FC8.3020405@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:4349 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758426Ab1EZWW0 (ORCPT ); Thu, 26 May 2011 18:22:26 -0400 In-Reply-To: <4DDE8FC8.3020405@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Stephen Boyd Cc: Anirudh Ghayal , Andrew Morton , rtc-linux@googlegroups.com, Wan ZongShun , linux-arm-msm@vger.kernel.org, Ashay Jaiswal On 05/26/2011 11:37 AM, Stephen Boyd wrote: > On 5/25/2011 10:15 PM, Anirudh Ghayal wrote: >> diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c >> new file mode 100644 >> index 0000000..4694c4e >> --- /dev/null >> +++ b/drivers/rtc/rtc-pm8xxx.c >> + >> +/** >> + * struct pm8xxx_rtc rtc driver internal structure > > This is missing a dash '-'. > >> +static int pm8xxx_read_wrapper(struct pm8xxx_rtc *rtc_dd, u8 *rtc_val, >> + int base, int count) >> +{ >> + int i, rc; >> + struct device *parent = rtc_dd->rtc_dev->parent; >> + >> + for (i = 0; i< count; i++) { >> + rc = pm8xxx_readb(parent, base + i,&rtc_val[i]); >> + if (rc< 0) { >> + dev_err(rtc_dd->rtc_dev, "PMIC read failed\n"); > > I still think these printks are useless when you already have better > printks at the call sites on the error path. I actually don't mind seeing the entire error flow in the log. pm8xxx_readb() might report a failure but it is sometimes help to know who the caller was that may have triggered the error. -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.