diff mbox

[v3,1/2] time: Add the common weak version of update_persistent_clock()

Message ID 1437907540-13610-1-git-send-email-xlpang@126.com
State Superseded
Headers show

Commit Message

Xunlei Pang July 26, 2015, 10:45 a.m. UTC
From: Xunlei Pang <pang.xunlei@linaro.org>

The weak update_persistent_clock64() calls update_persistent_clock(),
if the architecture defines an update_persistent_clock64() to replace
and remove its update_persistent_clock() version, when building the
kernel the linker will throw an undefined symbol error, that is, any
arch that switches to update_persistent_clock64() will have this issue.

To solve the issue, we add the common weak update_persistent_clock().

Cc: John Stultz <john.stultz@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
---
v2->v3:
Improve the changelog according to Thomas's comments.

 kernel/time/ntp.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

John Stultz July 29, 2015, 10:05 p.m. UTC | #1
On Sun, Jul 26, 2015 at 3:45 AM, Xunlei Pang <xlpang@126.com> wrote:
> From: Xunlei Pang <pang.xunlei@linaro.org>
>
> The weak update_persistent_clock64() calls update_persistent_clock(),
> if the architecture defines an update_persistent_clock64() to replace
> and remove its update_persistent_clock() version, when building the
> kernel the linker will throw an undefined symbol error, that is, any
> arch that switches to update_persistent_clock64() will have this issue.
>
> To solve the issue, we add the common weak update_persistent_clock().

So I'm ok with taking this patch.  I'm also ok with taking the
dependent MN10300 patch if I can get acks from maintainers.

Or if the MN10300 maintainers would prefer, they can take both patches w/ my:
   Acked-by: John Stultz <john.stultz@linaro.org>

thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
diff mbox

Patch

diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index fb4d98c..df68cb8 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -487,6 +487,11 @@  out:
 }
 
 #ifdef CONFIG_GENERIC_CMOS_UPDATE
+int __weak update_persistent_clock(struct timespec now)
+{
+	return -ENODEV;
+}
+
 int __weak update_persistent_clock64(struct timespec64 now64)
 {
 	struct timespec now;