Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2657950pxb; Mon, 17 Jan 2022 03:06:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGcEr7qmjPjGZ3rEG2KxYkjABLmYTZl6kyk72eVHWmUD6GXNcuoNs4pKq/4E0Dyd+EREVL X-Received: by 2002:a17:903:1209:b0:149:a968:6cf2 with SMTP id l9-20020a170903120900b00149a9686cf2mr21920905plh.110.1642417607131; Mon, 17 Jan 2022 03:06:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642417607; cv=none; d=google.com; s=arc-20160816; b=bqx17SF3LDoOGyLTpWRgYYy2JqFdP0NQXeSaM81h2mQ9GZimAw+kMw7HsL8zW1v8t6 limlBsWCmalcjWcetosY2AQpOZQTFpB/w6fBphqCRyocEb/7DglvrYUuoapfif0dCQIB wmONezZfnbYRlBrgDqWOwUg9Mxsg6CkytLdn0avnFDpeGnUn49c8+qQiPfN+vVFFVNm6 X+DrnmAi0cvQTboMDVF0l5siNilMqVyN9m5gaFhMOLlp7FG2eeNMvSBnUOuBAkoxCWH/ UI3MjR0dbPDKTGaHKVNNjynjSvVPIOYXryabLtc3WDpHNslIKxd+3yo5rfe3XZtdh/RY 7K4g== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BtKgVt6oADgMDjSHeStt9H4Wqa3Q3RKQBxsuOSuQGuQ=; b=zdNAcxSpKA2cBJIMvRkxCjfAzb5p93JJnFhLmn8dYnlYl6bNuMPLMrFiyaZafXaj5S e7K3Qc6G3R6IzcpkiCJgqwZCfKnGFBICrzpP6BcdJxihMgJivMgHOKwVdfKGeLRMZSsq SjWuVL7hA+LtXcCUz79KqF+4eyW5cNJQ09UkGPLZp94D807v449wchTh8WZFAr1fj8Yj b+j3E6PMbEBv2u4i26vt0hUS0VWIbESoHBc2MzhUslXww4rSfa0jWwY4EkDLd3YbqpUJ zbEjLGl0bcBcgoPAmW9OuvfUbhtqZNtdvb5uLqMohYJVV4AvQ1Sy2wPhK8LDwJwYalG/ PSBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e24si13616587pgh.544.2022.01.17.03.06.34; Mon, 17 Jan 2022 03:06:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236377AbiAPWqy (ORCPT + 99 others); Sun, 16 Jan 2022 17:46:54 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:33659 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230464AbiAPWqy (ORCPT ); Sun, 16 Jan 2022 17:46:54 -0500 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 9DA02240002; Sun, 16 Jan 2022 22:46:52 +0000 (UTC) Date: Sun, 16 Jan 2022 23:46:52 +0100 From: Alexandre Belloni To: Mateusz =?utf-8?Q?Jo=C5=84czyk?= Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, Alessandro Zummo Subject: Re: [PATCH] rtc-cmos: replace obsolete comments Message-ID: References: <20220107183029.486207-1-mat.jonczyk@o2.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220107183029.486207-1-mat.jonczyk@o2.pl> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/01/2022 19:30:29+0100, Mateusz Jończyk wrote: > The comments in cmos_read_alarm() and cmos_set_alarm() do not apply to > current code, replace them. > > These comments were added in > commit fbb974ba693b ("rtc: cmos: Do not export alarm rtc_ops when we do not support alarms") > which introduced a separate struct rtc_class_ops, which was used when > the device did not support RTC alarms. The functions cmos_read_alarm() > and cmos_set_alarm() were called not only from the rtc_op struct, but > also explicitly, so they had to independently check for RTC alarm > support. Isn't cmos_read_alarm still called directly from cmos_check_wkalrm and cmos_suspend ? > > The separate rtc_class_ops structure was later removed in > commit 30f5bd537fdb ("rtc: cmos: remove cmos_rtc_ops_no_alarm") > but the comments remained and now are obsolete. > > Signed-off-by: Mateusz Jończyk > Cc: Alessandro Zummo > Cc: Alexandre Belloni > --- > > This patch applies cleanly on rtc-next. > > drivers/rtc/rtc-cmos.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c > index 7c006c2b125f..cd82eff2630a 100644 > --- a/drivers/rtc/rtc-cmos.c > +++ b/drivers/rtc/rtc-cmos.c > @@ -290,7 +290,7 @@ static int cmos_read_alarm(struct device *dev, struct rtc_wkalrm *t) > .time = &t->time, > }; > > - /* This not only a rtc_op, but also called directly */ > + /* Fail if the RTC alarm is not supported */ > if (!is_valid_irq(cmos->irq)) > return -EIO; > > @@ -523,7 +523,7 @@ static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t) > unsigned char rtc_control; > int ret; > > - /* This not only a rtc_op, but also called directly */ > + /* Fail if the RTC alarm is not supported */ > if (!is_valid_irq(cmos->irq)) > return -EIO; > > -- > 2.25.1 > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com