[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3TJ-5+22_CSYjdtL3pXEVHC7t_KzaOX6PG4X_1R1bMxQ@mail.gmail.com>
Date: Thu, 3 May 2018 18:31:28 -0400
From: Arnd Bergmann <arnd@...db.de>
To: Baolin Wang <baolin.wang@...aro.org>
Cc: "Maciej W. Rozycki" <macro@...ux-mips.org>,
Ralf Baechle <ralf@...ux-mips.org>,
James Hogan <jhogan@...nel.org>, chenhc@...ote.com,
Kate Stewart <kstewart@...uxfoundation.org>,
gregkh <gregkh@...uxfoundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Philippe Ombredanne <pombredanne@...b.com>,
Mark Brown <broonie@...nel.org>,
Paul Burton <paul.burton@...s.com>,
Heiko Stuebner <heiko@...ech.de>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
"open list:RALINK MIPS ARCHITECTURE" <linux-mips@...ux-mips.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] MIPS: Convert update_persistent_clock() to update_persistent_clock64()
On Wed, May 2, 2018 at 10:53 PM, Baolin Wang <baolin.wang@...aro.org> wrote:
> diff --git a/arch/mips/include/asm/time.h b/arch/mips/include/asm/time.h
> index 17d4cd2..c4e2a1a 100644
> --- a/arch/mips/include/asm/time.h
> +++ b/arch/mips/include/asm/time.h
> @@ -27,8 +27,8 @@
> * rtc_mips_set_mmss - similar to rtc_set_time, but only min and sec need
> * to be set. Used by RTC sync-up.
> */
> -extern int rtc_mips_set_time(unsigned long);
> -extern int rtc_mips_set_mmss(unsigned long);
> +extern int rtc_mips_set_time(time64_t);
> +extern int rtc_mips_set_mmss(time64_t);
>
I think these should just get removed, and each implementation replaced
with a direct update_persistent_clock64() function.
> -int update_persistent_clock(struct timespec now)
> +int update_persistent_clock64(struct timespec64 now)
> {
> return rtc_mips_set_mmss(now.tv_sec);
> }
And this one also removed
> @@ -69,7 +69,7 @@ int proc_dolasatrtc(struct ctl_table *table, int write,
> if (rtctmp < 0)
> rtctmp = 0;
> }
> - r = proc_dointvec(table, write, buffer, lenp, ppos);
> + r = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
> if (r)
> return r;
>
> @@ -224,7 +224,7 @@ int proc_lasat_prid(struct ctl_table *table, int write,
> {
> .procname = "rtc",
> .data = &rtctmp,
> - .maxlen = sizeof(int),
> + .maxlen = sizeof(time64_t),
> .mode = 0644,
> .proc_handler = proc_dolasatrtc,
> },
Something seems wrong here: time64_t is not the same as 'unsigned long',
and the 'rtctmp' variable is still 'unsigned int'. Not sure what the right fix
would be (we don't seem to have a sysctl helper for s64), but the change
here makes it worse.
Arnd
Powered by blists - more mailing lists