From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
<linux-rtc@vger.kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] rtc: at91rm9200: stop calculating yday in at91_rtc_readalarm
Date: Fri, 10 Nov 2017 14:41:38 +0100 [thread overview]
Message-ID: <a00561dd-fb84-55d4-c819-12dd9d2bace7@microchip.com> (raw)
In-Reply-To: <20171110085931.32347-1-alexandre.belloni@free-electrons.com>
On 10/11/2017 at 09:59, Alexandre Belloni wrote:
> Calculating yday in the read_alarm callback is useless as this value is
> never used later. Also, it was buggy anyway because at the time this is
> done, tm_year is always 0 as the alarm register doesn't hold the year.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> ---
> drivers/rtc/rtc-at91rm9200.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
> index e221b78b6f10..e84f5ec4faf6 100644
> --- a/drivers/rtc/rtc-at91rm9200.c
> +++ b/drivers/rtc/rtc-at91rm9200.c
> @@ -208,7 +208,6 @@ static int at91_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
> struct rtc_time *tm = &alrm->time;
>
> at91_rtc_decodetime(AT91_RTC_TIMALR, AT91_RTC_CALALR, tm);
> - tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year);
> tm->tm_year = at91_alarm_year - 1900;
>
> alrm->enabled = (at91_rtc_read_imr() & AT91_RTC_ALARM)
>
--
Nicolas Ferre
prev parent reply other threads:[~2017-11-10 13:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-10 8:59 [PATCH 1/2] rtc: at91rm9200: stop calculating yday in at91_rtc_readalarm Alexandre Belloni
2017-11-10 8:59 ` [PATCH 2/2] rtc: at91rm9200: fix reading alarm value Alexandre Belloni
2017-11-10 14:55 ` Nicolas Ferre
2017-11-10 13:41 ` Nicolas Ferre [this message]
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=a00561dd-fb84-55d4-c819-12dd9d2bace7@microchip.com \
--to=nicolas.ferre@microchip.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.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