Received: by 10.223.185.116 with SMTP id b49csp8590841wrg; Fri, 2 Mar 2018 04:40:10 -0800 (PST) X-Google-Smtp-Source: AG47ELum+SEipxJU5dGxPNGNegr6zSt7usVtgoMElTHqi7QeQQB0TkhXM6/tywxy92SN6fKrfeYB X-Received: by 2002:a17:902:599b:: with SMTP id p27-v6mr4963946pli.289.1519994410021; Fri, 02 Mar 2018 04:40:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519994409; cv=none; d=google.com; s=arc-20160816; b=Dl9qqByDFHFO7BJz+PpZhlPbKXZiwuPU1xSwyVD3atMVS9e74qg/6wM4isInJgq57D fNQHoTmo0Eujb/myqCCnrAITExQN6KBrZLrpvkeuLNLe9FjY/Pjde8Kpdq+jJAII+r82 T+Xx6lY1oF8Edt+PTeaj1ieeLpjuGYVPlF/SfmYQxN8NLDpKMsKGYdanrWiIDBqGJ40T 08SIQUHJgA0b+uklxE+R3JsdJ49Cc9ggxgBQc+9AI8RBGIofDM2n1u3GF0efxEK0x/Ig TZwZplkVHZ0uLLYHsgXZH7VbQC05Zlh2H02qwOQAh2lYZYthfGhgzh3+tKUExnw5jRhw 1ezg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=7iiwpZhll5t9aShW/1tQDWkrXOQPvJizEcF+cJtNfK8=; b=WddtadKMtNE8Qm2iCWUR1Pbt1Y9tm7GcpGh0vqLQUXfrbdNVuRjTJFbOAYQs6ryveg k4jd9+dzFDIn1tyIbN5ndi2on9lKwP8M2w/5mcgH0BZSCiS2kqkgG2Ru1Jz/R3qSmmfp av0fKEZ1U4RWp5L4FZl4dYopnfOyEDptNvQzXdKT8i4Kjd/KAzmaTf1ZWoTiIGan83nO qH57rn+rpP0X/BqUCC+TfpoSH3go51U9Ia+FaKYiytjq6R6kUwx6Y105W0Axp8xX4Yyp uKIQcGJADY2lFUVsnAfEZt5WQh7BRfEF8VM+V+dggXncUN5Yp2DqGoTc7pP/SKMLxb+r ZLfA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=diasemi.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w24-v6si3704419pll.14.2018.03.02.04.39.53; Fri, 02 Mar 2018 04:40:09 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=diasemi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423098AbeCBIqy convert rfc822-to-8bit (ORCPT + 99 others); Fri, 2 Mar 2018 03:46:54 -0500 Received: from mail1.bemta26.messagelabs.com ([85.158.142.4]:25366 "EHLO mail1.bemta26.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423071AbeCBIqw (ORCPT ); Fri, 2 Mar 2018 03:46:52 -0500 Received: from [85.158.142.98] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-4.bemta.az-a.eu-central-1.aws.symcld.net id 94/F7-21477-A7F099A5; Fri, 02 Mar 2018 08:46:50 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMKsWRWlGSWpSXmKPExsUSt3OpsW4V/8w og1MT+C3a3y1jt7i8aw6bxbHVV9gcmD3mran2+LxJLoApijUzLym/IoE1o/31duaCn1wVP5uD Gxg7ObsYuTiEBJYwSlxYPJWti5GTg03AUGLem/eMILaIgKlEa+MuoDgHB7NAtcTWU+kgYWEBK 4mZ706yQZTYS2x9cI0JwtaTOPD5Klgri4CKxOZp+8FsXoEAifsbn4HVMArISnxpXM0MYjMLiE vcejIfLC4hICCxZM95ZghbVOLl43+sELa8xM1Xx1ggbHuJ1/fesYCcIyGgL9HXWAwRNpRYNe0 AVIm5xIZ1f9khxutILNj9iQ3C1pZYtvA1M8Q5ghInZz5hmcAoOgvJFbOQtMxC0jILScsCRpZV jOZJRZnpGSW5iZk5uoYGBrqGhsa6xroWeolVuol6qaW6yal5JUWJQDm9xPJiveLK3OScFL281 JJNjMAIYwCCHYzrviQeYpTkYFIS5fV7MSNKiC8pP6UyI7E4I76oNCe1+BCjDAeHkgRvJt/MKC HBotT01Iq0zBxgrMOkJTh4lER4z/ECpXmLCxJzizPTIVKnGHU5brx43cYsxJKXn5cqJc6rDjJ DAKQoozQPbgQs7VxilJUS5mUEOkqIpyC1KDezBFX+FaM4B6OSMK84yBSezLwSuE2vgI5gAjqC /e0MkCNKEhFSUg2MNa92aOXf4rmVlP5hpZ7K7MNz8hVaj8+o89iZXsxcdGXFV0+dFz3TF4SfE rhgY2MX0b4nXrFDUtAjp2x77lHXl2nvleKTuarkHSrz4/4a+oh822K/+O/qHfynXFiFb+cLft l1a23Ovik/dq3Uef2ObV3vqW8HOK7/LPt2+t/nlx2PH/l3beUyVWIpzkg01GIuKk4EAD6LhOs 2AwAA X-Env-Sender: stwiss.opensource@diasemi.com X-Msg-Ref: server-45.tower-223.messagelabs.com!1519980409!127839!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 24930 invoked from network); 2 Mar 2018 08:46:50 -0000 Received: from mailrelay2.diasemi.com (HELO sw-ex-cashub01.diasemi.com) (94.185.165.51) by server-45.tower-223.messagelabs.com with AES128-SHA encrypted SMTP; 2 Mar 2018 08:46:50 -0000 Received: from SW-EX-MBX01.diasemi.com ([169.254.3.71]) by sw-ex-cashub01.diasemi.com ([10.20.16.141]) with mapi id 14.03.0382.000; Fri, 2 Mar 2018 08:46:49 +0000 From: Steve Twiss To: Alexandre Belloni CC: "linux-kernel@vger.kernel.org" , "linux-rtc@vger.kernel.org" Subject: RE: [PATCH 000/100] rtc: remove cargo culted code Thread-Topic: RE: [PATCH 000/100] rtc: remove cargo culted code Thread-Index: AdOyAArsyG19aOFaT3ybTGNGmH1biA== Date: Fri, 2 Mar 2018 08:46:48 +0000 Message-ID: <6ED8E3B22081A4459DAC7699F3695FB701941570C7@SW-EX-MBX01.diasemi.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.20.26.49] x-kse-attachmentfiltering-interceptor-info: protection disabled x-kse-serverinfo: sw-ex-cashub01.diasemi.com, 9 x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: Clean, bases: 02/03/2018 05:18:00 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 21, 2018 at 8:54 PM, Alexandre Belloni wrote: > subject: [PATCH 000/100] rtc: remove cargo culted code > mailing list: linux-kernel@vger.kernel.org Filter messages from this mailing list > > Hello, > > This series: > - removes useless calls to rtc_valid_tm in .read_time, .set_time and > .set_alarm > - removes code setting default values for RTCs (and lets the core > handle it) > - removes useless "time is invalid" messages at probe time > - removes useless indirect calls > > Those were mostly copy pasted from other drivers Hi Alexandre, Acked for: rtc: da9063: stop validating rtc_time in .read_time rtc: da9052: stop validating rtc_time in .read_time rtc: da9055: stop validating rtc_time in .read_time Acked-by: Steve Twiss Agreed -- rtc_valid_tm() call is cargo cult for the above. (By definition) for DA9063 I was trying to be rigorous. The .read_time function is slightly different here because I can make a copy the alarm time into the RTC time structure to solve an RTC synchronisation problem internally to the DA9063. https://elixir.bootlin.com/linux/v4.5.6/source/drivers/rtc/rtc-da9063.c#L253 But after some further looking, I have not got any explicit case of how the time read directly from the DA9063 registers can be incorrectly represented. So there should be no need to check this. Regards, Steve