[PATCH 2/5] powerpc: rtas: clean up time handling

Arnd Bergmann arnd at arndb.de
Mon Apr 23 18:32:47 AEST 2018


On Mon, Apr 23, 2018 at 10:10 AM, Arnd Bergmann <arnd at arndb.de> wrote:

> @@ -307,17 +307,17 @@ static ssize_t ppc_rtas_poweron_write(struct file *file,
>                 const char __user *buf, size_t count, loff_t *ppos)
>  {
>         struct rtc_time tm;
> -       unsigned long nowtime;
> +       time64_t nowtime;
>         int error = parse_number(buf, count, &nowtime);
>         if (error)
>                 return error;
>
>         power_on_time = nowtime; /* save the time */
>
> -       to_tm(nowtime, &tm);
> +       rtc_time64_to_tm(nowtime, 0, &tm);
>

Here was the other obvious typo: I had originally changed this to
'time64_to_tm()', which has slightly different calling conventions to
'rtc_time64_to_tm()', and messed it up when I changed it back
after it turned out I needed to select RTC_LIB anyway.

v2 coming.

        Arnd


More information about the Linuxppc-dev mailing list