Received: by 10.192.165.148 with SMTP id m20csp408263imm; Thu, 3 May 2018 23:24:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpbv3iKjifLvcxlf4vQ4zEUmuArrbPByu3ZW6yswq6yRQ3qugOkxJuSKkWapLUqA/1yYltw X-Received: by 2002:a63:b955:: with SMTP id v21-v6mr4398041pgo.102.1525415098362; Thu, 03 May 2018 23:24:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525415098; cv=none; d=google.com; s=arc-20160816; b=DVNKDp3w8RTtiKA8VITxBBWhEPTf6bgAr6St6M1KvBEE5LzufGCURKC00xF4viIV5l pb6N/PmxEwWw1pcf+aGlM3N3QczMdyQjfuDyKgpVc4fUkK8qfsxPvZBogJd4B9HZVi63 142D9SkamQtvX4lrOgDTqmdqZlvd2PPs8bXR2VGie05uCC4vCrr7X7OltZutaytrQW15 qyEdfX/AdUf0aG4PwNwJjRHHjeyPQWA/cY7/1w3lIHVnsSDGla1MYqxWiG5+Z94hv6N0 fnkxwWdai5r99ovc8nFZEvfViEPJ1g5/8T1WQKcnkBKUPQ0D/PB5WXUeq0nsGIWOV5gg 9UYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=tpDAjOk4CfkAwXnsVkyXW8Y7XibRYdiqMPiH5aZEV5g=; b=NdjKdbR4Ditzbx6+SgxfqO2CLjbs0zhmCYWFE396LJQlIHLJvwS8YrJ15QNwsehE+P POitAtz5EBEsZI4q70Z3IPXpaI6H/73U+G0qzXPsRa0dpS2h/Dx6/LUyohlq3DqvLadA WtCjayvr1+AW2IDpitubsWuxjDgIKvLy2hnCAN0f53tmXmpo6CqkvE4irprb9ID+o3yS GFioJ8Udd7sHWY6A6OS49G9mxUkED6AqPKlqLWBsm95nlWLiV+iQBRz8lV2/0+0HpsDa ITLB6zOVyc9c4w32foZDIBu560cs25yYjrMU1Ev6ijH3wexITMl5DWpTuDPXsOoggtjw 4pbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XScgim0Y; 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 w12-v6si15023228pld.367.2018.05.03.23.24.42; Thu, 03 May 2018 23:24:58 -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=XScgim0Y; 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 S1751283AbeEDGXP (ORCPT + 99 others); Fri, 4 May 2018 02:23:15 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:36426 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751106AbeEDGXO (ORCPT ); Fri, 4 May 2018 02:23:14 -0400 Received: by mail-oi0-f65.google.com with SMTP id v2-v6so18241392oif.3 for ; Thu, 03 May 2018 23:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tpDAjOk4CfkAwXnsVkyXW8Y7XibRYdiqMPiH5aZEV5g=; b=XScgim0YheMkMVyHG+jXQxBfu+LqhkmvVlvMfIx5z7RRFqunrcqzVw1CAPuiS+pIwJ Cs+5bpDEnqcW7VVJMXyFkXvwhtwmMl0SBNmZEkOIMwPkccojwv5TAclgE4rrPzoBH9+M SskjOPgKpI45PKBRkum51d9wa+rwYAzIasPy4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tpDAjOk4CfkAwXnsVkyXW8Y7XibRYdiqMPiH5aZEV5g=; b=jQcw9pA0LSsVZA/8gF7PH0Qtpif1txQ4OeFGHr/GNMkTdHf/91i8FKntARlTCGsI8i kCzhaxLvHk9gwdEjId6djrSGsA4ys+oU183BD32WXCp/kXaZuCc1zNkyD9zOwKigExR9 WQyRoclfSyvUGOEcpvuO/9v3EIx19uy0uPW4gd6HKR/jFQRHvFSMVrG6F4PRixVmqFa1 3IFaAMN25oroE/ICOYgGn5UrlX+F2rxEonsicUUfGfhL8yCaEZU8394Gh+CafXNBIeB5 UgAEU1BYlghh/lIaEtYcz7bEmC5LBUO4q6GWO6B3yxlxWm4uEt65uc1gGmey/qBA4bFG N7hg== X-Gm-Message-State: ALQs6tDiSKWplDyRIZXXOTPypQgYzTdEhvAae3QXUbIOJGIUsnhGx6tL aeF/Ibr6Da8cpDaqurG7J/E6oxClrcl25ZToYKqSqQ== X-Received: by 2002:aca:5e86:: with SMTP id s128-v6mr9009442oib.68.1525414993485; Thu, 03 May 2018 23:23:13 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:2d77:0:0:0:0:0 with HTTP; Thu, 3 May 2018 23:23:13 -0700 (PDT) In-Reply-To: References: From: Baolin Wang Date: Fri, 4 May 2018 14:23:13 +0800 Message-ID: Subject: Re: [PATCH 2/2] MIPS: Convert update_persistent_clock() to update_persistent_clock64() To: Arnd Bergmann Cc: "Maciej W. Rozycki" , Ralf Baechle , James Hogan , chenhc@lemote.com, Kate Stewart , gregkh , Thomas Gleixner , Philippe Ombredanne , Mark Brown , Paul Burton , Heiko Stuebner , Daniel Lezcano , Viresh Kumar , "open list:RALINK MIPS ARCHITECTURE" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4 May 2018 at 06:31, Arnd Bergmann wrote: > On Wed, May 2, 2018 at 10:53 PM, Baolin Wang wrote: >> diff --git a/arch/mips/include/asm/time.h b/arch/mips/include/asm/time.h >> index 17d4cd2..c4e2a1a 100644 >> --- a/arch/mips/include/asm/time.h >> +++ b/arch/mips/include/asm/time.h >> @@ -27,8 +27,8 @@ >> * rtc_mips_set_mmss - similar to rtc_set_time, but only min and sec need >> * to be set. Used by RTC sync-up. >> */ >> -extern int rtc_mips_set_time(unsigned long); >> -extern int rtc_mips_set_mmss(unsigned long); >> +extern int rtc_mips_set_time(time64_t); >> +extern int rtc_mips_set_mmss(time64_t); >> > > I think these should just get removed, and each implementation replaced > with a direct update_persistent_clock64() function. I thought this was one minor modification that will reduce the risk of introducing other issues, but as you suggested we can do some complete cleanup by removing set_mmss/set_time. OK, I will do that. > >> -int update_persistent_clock(struct timespec now) >> +int update_persistent_clock64(struct timespec64 now) >> { >> return rtc_mips_set_mmss(now.tv_sec); >> } > > And this one also removed Sure. > >> @@ -69,7 +69,7 @@ int proc_dolasatrtc(struct ctl_table *table, int write, >> if (rtctmp < 0) >> rtctmp = 0; >> } >> - r = proc_dointvec(table, write, buffer, lenp, ppos); >> + r = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); >> if (r) >> return r; >> >> @@ -224,7 +224,7 @@ int proc_lasat_prid(struct ctl_table *table, int write, >> { >> .procname = "rtc", >> .data = &rtctmp, >> - .maxlen = sizeof(int), >> + .maxlen = sizeof(time64_t), >> .mode = 0644, >> .proc_handler = proc_dolasatrtc, >> }, > > Something seems wrong here: time64_t is not the same as 'unsigned long', > and the 'rtctmp' variable is still 'unsigned int'. Not sure what the right fix > would be (we don't seem to have a sysctl helper for s64), but the change > here makes it worse. After checking again, I agree with you. So I will keep the original code here. -- Baolin.wang Best Regards