rtc-cmos: replace obsolete comments
PATCH 1/1 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.
---
This patch applies cleanly on rtc-next.
drivers/rtc/rtc-cmos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/rtc-cmos.c +2 -2
@@ -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 ;
Signature · 1 line
2.25.1
Alexandre Belloni
maintainerQuoted 10 lines · Mateusz Jończyk
The comments in
cmos_read_alarm()andcmos_set_alarm()do not apply to current code, replace them.These comments were added in
commitfbb974ba693b("rtc: cmos: Do not export alarmrtc_opswhen we do not support alarms") which introduced a separate structrtc_class_ops, which was used when
the device did not support RTC alarms. The functionscmos_read_alarm()
andcmos_set_alarm()were called not only from thertc_opstruct, 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 ?
Quoted 40 lines
The separate
rtc_class_opsstructure was later removed incommit 30f5bd537fdb ("rtc: cmos: remove cmos_rtc_ops_no_alarm")but the comments remained and now are obsolete.
Signed-off-by Mateusz Jończyk <[email protected]>Cc Alessandro Zummo <[email protected]>Cc Alexandre Belloni <[email protected]>---
This patch applies cleanly on rtc-next.
drivers/rtc/rtc-cmos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/rtc/rtc-cmos.c +2
-2@@ -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 ;Signature · 1 line
2.25.1
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com