Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757507AbbEEUAQ (ORCPT ); Tue, 5 May 2015 16:00:16 -0400 Received: from down.free-electrons.com ([37.187.137.238]:44542 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753458AbbEEUAN (ORCPT ); Tue, 5 May 2015 16:00:13 -0400 Date: Tue, 5 May 2015 22:00:10 +0200 From: Alexandre Belloni To: Eddie Huang Cc: Lee Jones , Alessandro Zummo , Matthias Brugger , Andrew Morton , Tomasz Figa , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , srv_heupstream@mediatek.com, Samuel Ortiz , Greg KH , Joe Perches , linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Tianping Fang Subject: Re: [rtc-linux] [PATCH v3 2/3] rtc: mediatek: Add MT6397 RTC driver Message-ID: <20150505200010.GP4276@piout.net> References: <1430206556-18254-1-git-send-email-eddie.huang@mediatek.com> <1430206556-18254-3-git-send-email-eddie.huang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430206556-18254-3-git-send-email-eddie.huang@mediatek.com> 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: 1082 Lines: 38 Hi, This looks mostly good. Could you align the wrapped function parameters to the open parenthesis (use checkpatch --strict)? On 28/04/2015 at 15:35:55 +0800, Eddie Huang wrote : > +static int mtk_rtc_write_trigger(struct mt6397_rtc *rtc) > +{ > + unsigned long timeout = jiffies + HZ; > + int ret; > + u32 data; > + > + ret = regmap_write(rtc->regmap, rtc->addr_base + RTC_WRTGR, 1); > + if (ret < 0) > + return ret; > + > + do { > + cpu_relax(); > + ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_BBPU, > + &data); > + if (ret < 0) > + goto exit; > + } while ((data & RTC_BBPU_CBUSY) && time_after(timeout, jiffies)); > + Shouldn't you return -ETIMEDOUT if the loop breaks because of time_after? Thanks, -- 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/