From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Grant Feng <von81@163.com>
Cc: a.zummo@towertech.it, linux-rtc@vger.kernel.org
Subject: Re: [PATCH] rtc: interface:: 1969-12-31T23:59:59 is set as rtc_time if rtc_time is invalid in __rtc_read_time
Date: Sat, 1 Aug 2020 15:28:13 +0200 [thread overview]
Message-ID: <20200801132813.GE3679@piout.net> (raw)
In-Reply-To: <20200801112007.2148-1-von81@163.com>
Hi,
On 01/08/2020 19:20:07+0800, Grant Feng wrote:
> 1969-12-31T23:59:59 is an error more clear than Invalid argument
Definitively not, 1969-12-31T23:59:59 is a valid date and should not be
returned when it is known the current date is not set in the RTC.
>
> For example, when the RTC clock is not set, it will print a kernel
> error log every time someone tries to read the clock:
> ~ # hwclock -r
> hwclock: RTC_RD_TIME: Invalid argument
>
> It's clear and easy to understand what happened if print
> 1969-12-31T23:59:59 in this situation:
> ~ # hwclock -r
> Wed Dec 31 23:59:59 1969 0.000000 seconds
>
How do you know this is an error an not what is actually set on the RTC?
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2020-08-01 13:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-01 11:20 [PATCH] rtc: interface:: 1969-12-31T23:59:59 is set as rtc_time if rtc_time is invalid in __rtc_read_time Grant Feng
2020-08-01 13:28 ` Alexandre Belloni [this message]
2020-08-02 6:51 ` [PATCH] rtc: interface^ " Grant Feng
2020-08-02 13:04 ` Alexandre Belloni
2020-08-02 13:35 ` Grant Feng
2020-08-03 3:07 ` Grant Feng
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=20200801132813.GE3679@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=a.zummo@towertech.it \
--cc=linux-rtc@vger.kernel.org \
--cc=von81@163.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.