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: 153157 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp521923ljp; Fri, 7 Dec 2018 05:49:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uf1SeRf/AYL0Qt7f18N3cL5mgUHX6FUXqri2U+bSsOImrlarJuUgfcwVwMnv9ZUqe0oNye X-Received: by 2002:a63:1766:: with SMTP id 38mr1947443pgx.299.1544190598893; Fri, 07 Dec 2018 05:49:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544190598; cv=none; d=google.com; s=arc-20160816; b=Oa4U/Z2BcbvGsCQYwBOk39VcAdWIrzBWheVExH8Dv7Jc+2dxUqiSHyDDjNOI/3+XyP DolzH5rW0E/0Rnw0EdEMnPT3YyXjIWD8vssy92tXgy+iIUSffxWd8Balmfknl35Hf3D2 7uPh3bhZUT8+3s4pEu+uzI4SxyR/wkXgIDaYYoONkR27Ln9nY+i4PVZeeprbaQEYcXW6 IY8t+YwXBk4TYL8S1Jx09N5vlO6JQulkNyi9uKrDzUZDpzNImQcyYg5vQQZfSf4WfPlA pKpuIACpVn/v4Iscz7C12Xafrr3MKCPALnCvMo5GgiraC65ebcaxSZcz30lvcCQOA+QO sBYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=rnkDALge/4W/XnGYJvk/5NhNQN62icBOuqg3uLsaB2k=; b=Y1kKhb7er9qiC7+W9POQrcbdz86QMYc2yyiYBydo7eMSQZ8xzQIvzdh30emnJrZE3W TPxB2do4aZVd6RCe9lnwksvhFkVehBvI6OMmVmfnTZexC118R/ghSMHTHHOOSOB3ldyJ SGwrRfL1sDX5eZd7YwR9JLNIArSq78vVOvbX40+uquCAqi4MwdqOyfXtZJCFxW4xYnLG +97RsyDXs/iaBuyKwRrApa3JV80aUVYgG0MJxmd/8dgyyUjP/1mY22eThwXg9dtSdHLX 6b/Ur9D0tldocTDQQUIpWfG2GPcBhzJmkY8wwHsc+bX4wOBtQzbbUBkF5o2K56+WiVLh AFBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q18si2874689pls.30.2018.12.07.05.49.58; Fri, 07 Dec 2018 05:49:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726077AbeLGNt4 (ORCPT + 31 others); Fri, 7 Dec 2018 08:49:56 -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-Spam-Flag: NO 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- include/linux/timekeeping32.h | 6 ------ kernel/time/ntp.c | 10 +--------- kernel/time/timekeeping.c | 12 ++---------- 3 files changed, 3 insertions(+), 25 deletions(-) -- 2.18.0 Acked-by: John Stultz 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.