Thread (18 messages) 18 messages, 4 authors, 2017-01-16

[rtc-linux] Re: [PATCHv3 3/8] rtc: add STM32 RTC driver

From: Alexandre Belloni <hidden>
Date: 2017-01-11 00:08:18
Also in: linux-arm-kernel, linux-devicetree, lkml

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

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help