Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp984944rwi; Mon, 31 Oct 2022 09:48:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5xQJMzl8wgi3ZgxUuALMQT1QwheTy1tptO02ax4KA5q9rrIyGNbM3NsFllqKtTQZ9MB8RS X-Received: by 2002:a63:41c5:0:b0:46e:f23a:9fa2 with SMTP id o188-20020a6341c5000000b0046ef23a9fa2mr13835901pga.77.1667234881620; Mon, 31 Oct 2022 09:48:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667234881; cv=none; d=google.com; s=arc-20160816; b=W3zRbGdvg+W2WrVqh5zFK5/68iVaeO9HvQJ2f7sL7Aao7+LpwgeH1RxO/ld5Ys2jtK w0FFM4jJ/fbEsq7c70hcBP/WsIveAjeFsftN/LNvDxgD/Exl3/ENqeEo+vBNli6IzO0U XLu+pF0CLdE8/SQ2XR+lLjAi7z6gA6MGM/BY/R5GFMjLfBVGZA2isdxWF16OmFJtwct0 GcghPZ5zzXkUKo9RQ2gg5MZ4Ucftv2YmWFCABxxEL0Vv4IkMzXdczmQrb29MqIb5SLoi UKDHjwU4Eyasav9MCG6F30bjEoFPyQX2Wnuk1pEbENAzlTtmj7n8E3aeET/U2j/+u5yP WNBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ktu8OH92DZspQ/EalzrzH2xRK2hDUy12EpR7qlAoKb0=; b=NgtoHkpJJLEUnT2rZKwrSSWHlyIbCnLd8+eVURPQoU0jlbKyaNJp33qW4QMjnMRIGx UKdk9T3ImKhBZkwQRDa7Erc2DxHS1XkSYEbImSRjqIQoopX257rPO3NpC81JwTzFxg8+ BImXnOnP/cQBX6cFium5N5PnwEwhTVtn88uOihmJtBXqNZZM4/0FYL+lNAcfCc74hUah uH2GnehdX60X9zZX4PvyNHyffXwG0ntzUC1jobaTLUQ0MgEd8noKKrveVTWaE47blU1y 5KSLopkzz9V7KlMG7pCXDEDVnv/VKf4FcdJQEtZWYxUT4kj1a2pY3gCNO0RswYYpSwkE mYCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cJOxA2b0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l13-20020a056a00140d00b005572895941asi10669016pfu.139.2022.10.31.09.47.48; Mon, 31 Oct 2022 09:48:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cJOxA2b0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231841AbiJaQgy (ORCPT + 99 others); Mon, 31 Oct 2022 12:36:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231183AbiJaQgw (ORCPT ); Mon, 31 Oct 2022 12:36:52 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45C72E56 for ; Mon, 31 Oct 2022 09:36:51 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id io19so11220218plb.8 for ; Mon, 31 Oct 2022 09:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ktu8OH92DZspQ/EalzrzH2xRK2hDUy12EpR7qlAoKb0=; b=cJOxA2b0uPiBCezL07Ov82tEB4jHsTf3Ta5PEIqG7TnX4XNfxyySy0wk6i+wDyySZj i2+/m2JEoZUui7IU/AN9q1CbDBYhtHU1Ep/oFUbIYkB1PITOZjwszPoHhCTTLN/xE6Lr FtMUFI5OTIUTPNNQ/FUTjCvTa88nV+YH7D03w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ktu8OH92DZspQ/EalzrzH2xRK2hDUy12EpR7qlAoKb0=; b=RsRIkuDIdvAkAFQad1QAMla0GmEAlZ+xPrX2g91xtO51GI2jez7T1a3Skegosd+/1u 21O/hSWPkc9QJtm6VSpPSyHKCtSrycab76UWhXazw788CDOlfW4sQXHmQODQmnjqzC/y 1jgDIG+iUU+enjrJ44kK8zBDT/107dYJpfew3lkR/lrSessp0cqk9SNQcL1FrBdIsRLA a/Q5OECN4a4AhkgdvCimEf2JesEubn9Fkc0WconXLTDSHE1wiFs47/DAstvYLqfzxXQg Z2l1UcDu/69fXrGDfN6ax1KdRCidJcT8Bs4xIY2RF+OCVLIEBmAw7URCY7nOk57QRt/o X7Pg== X-Gm-Message-State: ACrzQf12k9ndiAbgqG4WfZm6jPIl5+lp7HoxzoWvDbHmfTrNX86xoJCT MTg2qRNfC8TNyOs+n7vmVrmMyA== X-Received: by 2002:a17:903:234c:b0:187:28b2:85f6 with SMTP id c12-20020a170903234c00b0018728b285f6mr3796395plh.106.1667234210737; Mon, 31 Oct 2022 09:36:50 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:cf9d:6561:637d:2194]) by smtp.gmail.com with ESMTPSA id m3-20020a17090a3f8300b0020a7d076bfesm4443584pjc.2.2022.10.31.09.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 09:36:50 -0700 (PDT) Date: Mon, 31 Oct 2022 09:36:47 -0700 From: Brian Norris To: Tzung-Bi Shih Cc: Guenter Roeck , Alessandro Zummo , Alexandre Belloni , Benson Leung , linux-rtc@vger.kernel.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rtc: cros-ec: Limit RTC alarm range if needed Message-ID: References: <20221029005400.2712577-1-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 31, 2022 at 11:26:44AM +0800, Tzung-Bi Shih wrote: > On Fri, Oct 28, 2022 at 05:54:00PM -0700, Guenter Roeck wrote: > > Drop error messages in cros_ec_rtc_get() and cros_ec_rtc_set() since the > > calling code also logs an error and to avoid spurious error messages if > > setting the alarm ultimately succeeds. > > It only retries for cros_ec_rtc_set(). cros_ec_rtc_get() doesn't emit > spurious error messages. All of cros_ec_rtc_get()'s callers were also logging the same message. So it was redundant. I think the general strategy here was to log the error(s) in callers (last point before we "exit" the driver), to have the best chance at context-relevant error messages, or ignoring them where proper. It's already a bit dubious to log kernel messages at all in response to normal sysfs operations. We probably want them in some cases, when things are particularly unexpected, but it shouldn't be a regular occurrence, and we certainly don't need *two* log lines for each error. Technically, if one wants to be super-nitpicky about one purpose per patch, then maybe a patch to trim the logging, and a patch to fix the alarm range issues... ...but I think that would be a little silly, and perhaps even harmful. They are related concerns that should be patched (and probably backported) together. Brian