lkml.org 
[lkml]   [2018]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 2/3] [v2] m68k: mac: use time64_t in RTC handling
On Wed, 18 Jul 2018, Geert Uytterhoeven wrote:

>
> Thanks for your patch!
>
> Applied and queued for v4.19, with the WARN_ON() dropped.
>

The patch you've committed to your for-v4.19 branch has this hunk:

@@ -269,8 +275,12 @@ static long via_read_time(void)
via_pram_command(0x89, &result.cdata[1]);
via_pram_command(0x8D, &result.cdata[0]);

- if (result.idata == last_result.idata)
+ if (result.idata == last_result.idata) {
+ if (result.idata < RTC_OFFSET)
+ result.idata += 0x100000000ull;
+
return result.idata - RTC_OFFSET;
+ }

if (++count > 10)
break;

That looks bogus to me, since result.idata is a long.

Also, the following hunk seems a bit pointless (?)

@@ -291,11 +301,11 @@ static long via_read_time(void)
* is basically any machine with Mac II-style ADB.
*/

-static void via_write_time(long time)
+static void via_write_time(time64_t time)
{
union {
__u8 cdata[4];
- long idata;
+ __u32 idata;
} data;
__u8 temp;

But if data.idata needs to be changed to __u32 here, why not change the
same struct member in via_read_time() also?

--

\
 
 \ /
  Last update: 2018-07-18 14:03    [W:0.108 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site