Patch "rtc: allow rtc_read_alarm without read_alarm callback" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    rtc: allow rtc_read_alarm without read_alarm callback

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rtc-allow-rtc_read_alarm-without-read_alarm-callback.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f773f0722f9c73e18e24115892629a095ae71848
Author: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
Date:   Tue Feb 14 23:27:53 2023 +0100

    rtc: allow rtc_read_alarm without read_alarm callback
    
    [ Upstream commit a783c962619271a8b905efad1d89adfec11ae0c8 ]
    
    .read_alarm is not necessary to read the current alarm because it is
    recorded in the aie_timer and so rtc_read_alarm() will never call
    rtc_read_alarm_internal() which is the only function calling the callback.
    
    Reported-by: Zhipeng Wang <zhipeng.wang_1@xxxxxxx>
    Reported-by: Marcel Ziswiler <marcel.ziswiler@xxxxxxxxxxx>
    Fixes: 7ae41220ef58 ("rtc: introduce features bitfield")
    Tested-by: Philippe Schenker <philippe.schenker@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230214222754.582582-1-alexandre.belloni@xxxxxxxxxxx
    Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 7c30cb3c764d8..499d89150afc9 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -392,7 +392,7 @@ int rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
 		return err;
 	if (!rtc->ops) {
 		err = -ENODEV;
-	} else if (!test_bit(RTC_FEATURE_ALARM, rtc->features) || !rtc->ops->read_alarm) {
+	} else if (!test_bit(RTC_FEATURE_ALARM, rtc->features)) {
 		err = -EINVAL;
 	} else {
 		memset(alarm, 0, sizeof(struct rtc_wkalrm));



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux