From patchwork Fri Dec 7 13:48:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10718161 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 81FDC13BF for ; Fri, 7 Dec 2018 13:50:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7142E2E5B4 for ; Fri, 7 Dec 2018 13:50:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65D7A2E600; Fri, 7 Dec 2018 13:50:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16B292E5B4 for ; Fri, 7 Dec 2018 13:50:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726193AbeLGNty (ORCPT ); Fri, 7 Dec 2018 08:49:54 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:55939 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726067AbeLGNt0 (ORCPT ); Fri, 7 Dec 2018 08:49:26 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MFbFW-1ggky21jdW-00HBPo; Fri, 07 Dec 2018 14:49:00 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-sh@vger.kernel.org, Baolin Wang , Andrew Morton , John Stultz , Alexander Viro , Thomas Gleixner , Rich Felker , Yoshinori Sato , Arnd Bergmann Subject: [PATCH 5/8] timekeeping: remove unused {read,update}_persistent_clock Date: Fri, 7 Dec 2018 14:48:21 +0100 Message-Id: <20181207134824.300024-6-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181207134824.300024-1-arnd@arndb.de> References: <20181207134824.300024-1-arnd@arndb.de> X-Provags-ID: V03:K1:OcW1EjK2QvkncvWHyHl+OxmhGy7ZIKUinp3oxKVRHZE3HIC2kDW iOCDasX8geUc44bVIaIVlJa7GQIzVPeXjQ/zACjzeVgWT75LzL9QxQzrFYEuy5V4VEP0LjT 4jDaOZb6zd2Xw7JVbg2BuCIEmiFCUNMtMhXs9qq1ShDabg1TFl83A32PRR/J9iVbEl7Bbf+ 2TybBy312Ym1G1uDYThZA== X-UI-Out-Filterresults: notjunk:1;V03:K0:OjdzZaaMYb0=:hhn4tt77z/XwUlvehXYcED BQ7aygCmWjIji7cDKTxf6sYxpcjy6Ewxb1rXdkUM8JZcCcdbOp/fY82fN1NMvgXXXRnZ/Ydr3 eiXvXcecwXh2wLP/Af8CfWbyXi7qN4K19mgLMsamvLcf/V41RNoaLHK3oRpKjPqojAw3XMZzu J79lzjLWKn9OehvIjAKcHKvofx4CVoavUbExCCNFj27iaBTeJRXGLb4I6kfuvLmMIK3b3kOZs LFBldss6SchWde1IvoH8PTVhbeWZkdXKS31NvRZQMVAbPGjPqF+GDyyxb2woQwGHL0Lh4JDZT 3Y/PqJT6+s3IpnXI7wAu7sm+xir+mhdBAzVnzpOfbd9lre6F/XDIoAPbyePDOu4E60yeTQPSO 5gG18xlMWw6Y/4nkaqG724NCZulJfgI3Vt10Fs52m+Jw8dGIibY4KP+KpcDaEeFzogDL1ROkO iZTLa1xsYV/W6Z+xPuWQ/6esK0nrlqmCDSteCwlgey8UWOLXEnTmrRa100f17bjNHINb4m4VF PHBIRwIBCeFYgdGYgMKwA7b7kQK1uUWBz+MGc6OtvjNEMsVvezimUnQEHIU0ungyZeEfAZPuG V9auTF3Vk6qSqUlj/5UGB+hXR6ehvBEiDcfGbBb107fMCfwtAhGKeFgrLiuSTEwJ3VkWx24OR aEqSTl+tcZx5c2XA4SeAgVc8ESiW+0fs3IP6ChomTM0gVHSUdkvIr4UXYfTHAIP8WArSaoJMs JgyP82vqq3Ymt9L8RtNxHBCbL2yVulTB2zqNxw== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP After arch/sh has removed the last reference to these functions, we can remove them completely and just rely on the 64-bit time_t based versions. This cleans up a rather ugly use of __weak functions. Signed-off-by: Arnd Bergmann Acked-by: John Stultz --- include/linux/timekeeping32.h | 6 ------ kernel/time/ntp.c | 10 +--------- kernel/time/timekeeping.c | 12 ++---------- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/include/linux/timekeeping32.h b/include/linux/timekeeping32.h index a502616f7e1c..0036ff314ac5 100644 --- a/include/linux/timekeeping32.h +++ b/include/linux/timekeeping32.h @@ -52,10 +52,4 @@ static inline void getboottime(struct timespec *ts) *ts = timespec64_to_timespec(ts64); } -/* - * Persistent clock related interfaces - */ -extern void read_persistent_clock(struct timespec *ts); -extern int update_persistent_clock(struct timespec now); - #endif diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index c5e0cba3b39c..e23be418d015 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -555,17 +555,9 @@ static void sync_rtc_clock(void) } #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; - - now = timespec64_to_timespec(now64); - return update_persistent_clock(now); + return -ENODEV; } #endif diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 2d110c948805..eb09be4871b3 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1467,7 +1467,7 @@ u64 timekeeping_max_deferment(void) } /** - * read_persistent_clock - Return time from the persistent clock. + * read_persistent_clock64 - Return time from the persistent clock. * * Weak dummy function for arches that do not yet support it. * Reads the time from the battery backed persistent clock. @@ -1475,20 +1475,12 @@ u64 timekeeping_max_deferment(void) * * XXX - Do be sure to remove it once all arches implement it. */ -void __weak read_persistent_clock(struct timespec *ts) +void __weak read_persistent_clock64(struct timespec64 *ts) { ts->tv_sec = 0; ts->tv_nsec = 0; } -void __weak read_persistent_clock64(struct timespec64 *ts64) -{ - struct timespec ts; - - read_persistent_clock(&ts); - *ts64 = timespec_to_timespec64(ts); -} - /** * read_persistent_wall_and_boot_offset - Read persistent clock, and also offset * from the boot.