linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	Chris Brandt <chris.brandt@renesas.com>,
	linux-rtc@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] rtc: sh: Fix invalid alarm warning for non-enabled alarm
Date: Wed, 20 Mar 2019 11:38:27 +0100	[thread overview]
Message-ID: <20190320103827.GO29054@piout.net> (raw)
In-Reply-To: <20190320103214.20394-1-geert+renesas@glider.be>

On 20/03/2019 11:32:14+0100, Geert Uytterhoeven wrote:
> When no alarm has been programmed on RSK-RZA1, an error message is
> printed during boot:
> 
>     rtc rtc0: invalid alarm value: 2019-03-14T255:255:255
> 
> sh_rtc_read_alarm_value() returns 0xff when querying a hardware alarm
> field that is not enabled.  __rtc_read_alarm() validates the received
> alarm values, and fills in missing fields when needed.
> While 0xff is handled fine for the year, month, and day fields, and
> corrected as considered being out-of-range, this is not the case for the
> hour, minute, and second fields, where -1 is expected for missing
> fields.
> 
> Fix this by returning -1 instead, as this value is handled fine for all
> fields.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/rtc/rtc-sh.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      reply	other threads:[~2019-03-20 10:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 10:32 [PATCH] rtc: sh: Fix invalid alarm warning for non-enabled alarm Geert Uytterhoeven
2019-03-20 10:38 ` Alexandre Belloni [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=20190320103827.GO29054@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=chris.brandt@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-renesas-soc@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;
as well as URLs for NNTP newsgroup(s).