From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758867AbdAKAIS (ORCPT ); Tue, 10 Jan 2017 19:08:18 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:44851 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758807AbdAKAIR (ORCPT ); Tue, 10 Jan 2017 19:08:17 -0500 Date: Wed, 11 Jan 2017 01:08:03 +0100 From: Alexandre Belloni To: Amelie Delaunay Cc: Alessandro Zummo , Rob Herring , Mark Rutland , Maxime Coquelin , Alexandre Torgue , Russell King , rtc-linux@googlegroups.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Gabriel Fernandez Subject: Re: [PATCHv3 3/8] rtc: add STM32 RTC driver Message-ID: <20170111000803.mlie6kizcsj2o7lh@piout.net> References: <1483623809-29937-1-git-send-email-amelie.delaunay@st.com> <1483623809-29937-4-git-send-email-amelie.delaunay@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1483623809-29937-4-git-send-email-amelie.delaunay@st.com> User-Agent: NeoMutt/20161126 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Looks good to me, however... On 05/01/2017 at 14:43:24 +0100, Amelie Delaunay wrote : > +struct stm32_rtc { > + struct rtc_device *rtc_dev; > + void __iomem *base; > + struct clk *ck_rtc; > + spinlock_t lock; /* Protects registers accesses */ This spinlock seems to be useless, the rtc ops_lock is already protecting everywhere it is taken. > + int irq_alarm; > +}; > + [...] > +static int stm32_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) > +{ > + struct stm32_rtc *rtc = dev_get_drvdata(dev); > + struct rtc_time *tm = &alrm->time; > + unsigned long irqflags; > + unsigned int cr, isr, alrmar; > + int ret = 0; > + > + if (rtc_valid_tm(tm)) { > + dev_err(dev, "Alarm time not valid.\n"); > + return -EINVAL; This will never happen, tm is already checked multiple times (up to three) in the core before this function can be called. > + } > + You don't need to resend the whole series, just this patch. I'll take 2/8 and 3/8, the other ones can go through the stm32 tree. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com