devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amelie DELAUNAY <amelie.delaunay-qxv4g6HH51o@public.gmane.org>
To: Alexandre Belloni
	<alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: Alessandro Zummo
	<a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Maxime Coquelin
	<mcoquelin.stm32-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Alexandre TORGUE <alexandre.torgue-qxv4g6HH51o@public.gmane.org>,
	Russell King <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>,
	"rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org"
	<rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Gabriel FERNANDEZ
	<gabriel.fernandez-qxv4g6HH51o@public.gmane.org>
Subject: Re: [PATCHv3 3/8] rtc: add STM32 RTC driver
Date: Wed, 11 Jan 2017 11:07:16 +0100	[thread overview]
Message-ID: <1feb3a23-7450-2b5c-9c1c-c7ecacd7fa17@st.com> (raw)
In-Reply-To: <20170111000803.mlie6kizcsj2o7lh-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>

Hi Alexandre,

On 01/11/2017 01:08 AM, Alexandre Belloni wrote:
> 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.
>
After having a deeper look on ops_lock, it seems this one is sufficient, 
so I'll remove all spinlock uses in this driver.
>> +	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're right. I'll remove all rtc_valid_tm calls.
>> +	}
>> +
>
> 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.
>
Thanks for reviewing. I send a v4 for this patch right now.

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

  parent reply	other threads:[~2017-01-11 10:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05 13:43 [PATCHv3 0/8] Add support for STM32 RTC Amelie Delaunay
2017-01-05 13:43 ` [PATCHv3 1/8] ARM: dts: stm32: set HSE_RTC clock frequency to 1 MHz on stm32f429 Amelie Delaunay
2017-01-05 13:43 ` [PATCHv3 2/8] dt-bindings: document the STM32 RTC bindings Amelie Delaunay
2017-01-13  0:39   ` Alexandre Belloni
2017-01-05 13:43 ` [PATCHv3 3/8] rtc: add STM32 RTC driver Amelie Delaunay
     [not found]   ` <1483623809-29937-4-git-send-email-amelie.delaunay-qxv4g6HH51o@public.gmane.org>
2017-01-05 17:33     ` Mathieu Poirier
     [not found]       ` <20170105173301.GA27341-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-01-09 16:46         ` Amelie DELAUNAY
2017-01-11  0:08     ` Alexandre Belloni
     [not found]       ` <20170111000803.mlie6kizcsj2o7lh-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
2017-01-11 10:07         ` Amelie DELAUNAY [this message]
     [not found]           ` <1feb3a23-7450-2b5c-9c1c-c7ecacd7fa17-qxv4g6HH51o@public.gmane.org>
2017-01-11 10:17             ` Alexandre Belloni
     [not found]               ` <20170111101708.ujcgo7kpyywymyzp-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
2017-01-11 10:42                 ` Amelie DELAUNAY
     [not found]                   ` <ff7a532e-a2a7-920a-29d9-e8a82d6ed915-qxv4g6HH51o@public.gmane.org>
2017-01-11 10:50                     ` Alexandre Belloni
2017-01-05 13:43 ` [PATCHv3 4/8] ARM: dts: stm32: Add RTC support for STM32F429 MCU Amelie Delaunay
2017-01-05 13:43 ` [PATCHv3 5/8] ARM: dts: stm32: enable RTC on stm32f429-disco Amelie Delaunay
2017-01-05 13:43 ` [PATCHv3 6/8] ARM: dts: stm32: enable RTC on stm32f469-disco Amelie Delaunay
2017-01-05 13:43 ` [PATCHv3 7/8] ARM: dts: stm32: enable RTC on stm32429i-eval Amelie Delaunay
2017-01-05 13:43 ` [PATCHv3 8/8] ARM: configs: stm32: Add RTC support in STM32 defconfig Amelie Delaunay
     [not found]   ` <1483623809-29937-9-git-send-email-amelie.delaunay-qxv4g6HH51o@public.gmane.org>
2017-01-16 14:37     ` Alexandre Torgue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1feb3a23-7450-2b5c-9c1c-c7ecacd7fa17@st.com \
    --to=amelie.delaunay-qxv4g6hh51o@public.gmane.org \
    --cc=a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org \
    --cc=alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=alexandre.torgue-qxv4g6HH51o@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=gabriel.fernandez-qxv4g6HH51o@public.gmane.org \
    --cc=linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=mcoquelin.stm32-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).