lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220107183029.486207-1-mat.jonczyk@o2.pl>
Date:   Fri,  7 Jan 2022 19:30:29 +0100
From:   Mateusz Jończyk <mat.jonczyk@...pl>
To:     linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Mateusz Jończyk <mat.jonczyk@...pl>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>
Subject: [PATCH] rtc-cmos: replace obsolete comments

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.

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 <mat.jonczyk@...pl>
Cc: Alessandro Zummo <a.zummo@...ertech.it>
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>
---

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ