From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1945894AbbGZBzc (ORCPT ); Sat, 25 Jul 2015 21:55:32 -0400 Received: from m50-110.126.com ([123.125.50.110]:55223 "EHLO m50-110.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755079AbbGZBza (ORCPT ); Sat, 25 Jul 2015 21:55:30 -0400 From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: Thomas Gleixner , David Howells , Koichi Yasutake , linux-am33-list@redhat.com, Xunlei Pang , John Stultz , Arnd Bergmann Subject: [PATCH v2 1/2] time: Add the common weak version of update_persistent_clock() Date: Sun, 26 Jul 2015 09:53:52 +0800 Message-Id: <1437875633-5715-1-git-send-email-xlpang@126.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: jdKowAAHrCTXPbRVwMbaAQ--.5958S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7JFyDKrW5JFyrXr1fKr1UGFg_yoWDuFcEgr 12qFykKr1ktF9ayF1qya1SqF95trWYvF1qvwsIgFWxJr1DJF1UJry2g393Xw1UZFW09r17 uF45C3y3tr13JjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUnenmtUUUUU== X-Originating-IP: [210.21.223.3] X-CM-SenderInfo: p0ost0bj6rjloofrz/1tbiXB9Dv1R0Xn-qWgAAsO Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xunlei Pang The weak update_persistent_clock64() calls update_persistent_clock(), if the architecture defines a update_persistent_clock64() to replace and remove its update_persistent_clock() version, the compiler will throw an undefined symbol error, that is, any arch that switches to update_persistent_clock64() will have this issue. So, we should add the common weak update_persistent_clock(). Cc: John Stultz Cc: Arnd Bergmann Signed-off-by: Xunlei Pang --- kernel/time/ntp.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 1.9.1