From patchwork Thu Apr 19 06:22:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 133699 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp273976ljf; Wed, 18 Apr 2018 23:23:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/RSLTUhE4lp+xgxZGo2dz9dG+qms6Ym/50r6uUtd+bI1Ui+T4awIxQPynUPG2K/fusiel+ X-Received: by 10.101.97.1 with SMTP id z1mr4207218pgu.134.1524118990270; Wed, 18 Apr 2018 23:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524118990; cv=none; d=google.com; s=arc-20160816; b=jPlgEj650Z5ViX3rF/gxKs/AuGnpQfMDzVQtekEgOMKrhwIR6LkP+ISrRdqIClWTuX LQwOZZ8FImfajikwm9XVSHyL7pNO1K+GuDOXLU0hnos+WrlCBnATwb2o9taAIj6mskyX XEuT6u5hF30UlKPiUVH6PV0Erf0gGdiWN2SdI+85jJNRw1HKqV8dUggUsXe96VunQ8TN cpm451kkGXLZO9SRYWxPLbn1guxdfmmHDq/3dMB1u/iANjhD31LKrT3b+HDYFW+H0V+s e0/2TX7B0QJcDyq+zsU6Bq6DiWu0hQ1Wr3TyluxJOw41S6wdVSu9sSWV1tdfMssTN5O9 vEpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=6CyXBOm2jAxeqZQGxkyyceIqftaLJC0sZ0L3yF27P+U=; b=H8mVhPfOjlgUKmJkH1V58kBI5TK8EoXSfItQqMZJyoP+l8efTXFxQidzWcnnxW5yKO pR00maIiNqhy1KEfZ5esmjLb6kX8raPaz9LVydf9eS8txGvnHcVfOMSyEtdj1uDo5duG pOvnvFpUJiTRZ114dKsCzI212FaDaYj8MsZJw1OD2lSopmtRam+p9MuHvYJryA5PnBrM fy5Sw/6bSsPm+xsPywBz05GDiOlE1weSLQpmLCdwr5DQVqmPkwO/Lstbxepq9mh8nS6L YF7A/vtrKDIIsq68NJJpWamXpyAKX60PE2YSDDsuheoZCQH58gIV1sapZGOL7RSn5Drr IM3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OljSMw4d; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b124si2395048pgc.121.2018.04.18.23.23.09; Wed, 18 Apr 2018 23:23:10 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=OljSMw4d; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751660AbeDSGXH (ORCPT + 29 others); Thu, 19 Apr 2018 02:23:07 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:40902 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750884AbeDSGXG (ORCPT ); Thu, 19 Apr 2018 02:23:06 -0400 Received: by mail-pf0-f194.google.com with SMTP id y66so2122171pfi.7 for ; Wed, 18 Apr 2018 23:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=6CyXBOm2jAxeqZQGxkyyceIqftaLJC0sZ0L3yF27P+U=; b=OljSMw4d2Pn6xOM/RC9M6z5lURPxOyal/VQVhOnh2gn3jS5L87lKDhOitYhw+gZOb0 fX367ZFHgGBQT+EJvMRp8me9Iqg7GjuoDVHHUzmCyhaSuqWxNyXbAdxkLUd4ljbU0K7g cGhe7/LdSvxJaYrmYoWWn4PO8P4PdCEovsgqE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6CyXBOm2jAxeqZQGxkyyceIqftaLJC0sZ0L3yF27P+U=; b=qlVmzYbv74dygjEsy9DMqgSvw3kshOMrpk/ctNavSyVYy797tkqb5kPVGIPs7F8cWe lzEXL0yNhyxRvmEiYaga3shv1YDw2KqEnGepffzTgLiIpx2mv7Vh3zYp05D2c9ZHoA93 1TNMbnaG5CsTzvjBtEYHrWtqSp/7O+YVyXTwEG2EGaNzOZBJlaMWynfjVQVxGJETnWJF i/gzurC6dxaCSDCOo5Jh0njQ2IsuLsQdDvXR7+mkWHn9Ur/YcJztaE4UpiobGy/+9msL kjuisIVkBhCfWUsq+Dl6TbYA2wT81KYd6F5OpqeFFHW1CqBOY+R5VuEBEkkYREMNrYrI vKWQ== X-Gm-Message-State: ALQs6tBufCYQMU2xOTLptucFaS2kIuYY680HEISb0yX/jMBBWeqeNC0d Q13D5r24EiugkZt5jx5+zC8dbA== X-Received: by 10.98.150.75 with SMTP id c72mr4684796pfe.62.1524118985697; Wed, 18 Apr 2018 23:23:05 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id e14sm4686666pfi.50.2018.04.18.23.23.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Apr 2018 23:23:04 -0700 (PDT) From: Baolin Wang To: geert@linux-m68k.org Cc: alexandre.belloni@bootlin.com, arnd@arndb.de, broonie@kernel.org, linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, baolin.wang@linaro.org Subject: [PATCH] m68k: Remove read_persistent_clock() Date: Thu, 19 Apr 2018 14:22:20 +0800 Message-Id: <0ca46228311ec615947e199def9fed62d70c1f07.1524118799.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The read_persistent_clock() uses a timespec, which is not year 2038 safe on 32bit systems. Moreover on m68k architecture, we have implemented generic RTC drivers that can be used to compensate the system suspend time. So we can remove the obsolete read_persistent_clock(). Signed-off-by: Baolin Wang --- arch/m68k/kernel/time.c | 16 ---------------- 1 file changed, 16 deletions(-) -- 1.7.9.5 diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 97dd4e2..cb386d8 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c @@ -71,22 +71,6 @@ static irqreturn_t timer_interrupt(int irq, void *dummy) return IRQ_HANDLED; } -void read_persistent_clock(struct timespec *ts) -{ - struct rtc_time time; - ts->tv_sec = 0; - ts->tv_nsec = 0; - - if (mach_hwclk) { - mach_hwclk(0, &time); - - if ((time.tm_year += 1900) < 1970) - time.tm_year += 100; - ts->tv_sec = mktime(time.tm_year, time.tm_mon, time.tm_mday, - time.tm_hour, time.tm_min, time.tm_sec); - } -} - #if defined(CONFIG_ARCH_USES_GETTIMEOFFSET) && IS_ENABLED(CONFIG_RTC_DRV_GENERIC) static int rtc_generic_get_time(struct device *dev, struct rtc_time *tm) {