linux-mips
[Top] [All Lists]

Re: [PATCH] remove mips_rtc_lock

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [PATCH] remove mips_rtc_lock
From: Ralf Baechle <ralf@linux-mips.org>
Date: Thu, 3 Nov 2005 11:05:53 +0000
Cc: linux-mips@linux-mips.org
In-reply-to: <20051103.010240.41630907.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20051103.010240.41630907.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.2.1i
On Thu, Nov 03, 2005 at 01:02:40AM +0900, Atsushi Nemoto wrote:

> The mips_rtc_lock is no longer needed because RTC operations should be
> protected already by other mechanism. (rtc_lock, local_irq_save, etc.)
> 
> Also, locking whole rtc_get_time/rtc_set_time should be avoided while
> some RTC routines might take very long time (a few seconds).
> 
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

Applied.  Thanks alot for the janitor work.

And also the function names are clear as mud:

[...]
static inline unsigned int get_rtc_time(struct rtc_time *time)
{
        unsigned long nowtime;

        nowtime = rtc_get_time();
[...]
static inline int set_rtc_time(struct rtc_time *time)
{
        unsigned long nowtime;
        int ret;

        nowtime = mktime(time->tm_year+1900, time->tm_mon+1,
                        time->tm_mday, time->tm_hour, time->tm_min,
                        time->tm_sec);
        ret = rtc_set_time(nowtime);
[...]

The difference between and get_rtc_time and rtc_get_time is less than
obvious.  Same for set_rtc_time and rtc_set_time ...

   Ralf

<Prev in Thread] Current Thread [Next in Thread>