The branch main has been updated by dsl:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=645a228481c778b62fcd6c23e6f4786ceb8f1300

commit 645a228481c778b62fcd6c23e6f4786ceb8f1300
Author:     Dmitry Salychev <d...@freebsd.org>
AuthorDate: 2024-06-03 13:41:11 +0000
Commit:     Dmitry Salychev <d...@freebsd.org>
CommitDate: 2024-06-03 13:41:11 +0000

    ds1307: Return error code instead of boolean
    
    It's probably a copy-paste leftover from the other functions which
    return a boolean value and generates annoying "CLOCK_SETTIME error 1"
    from subr_rtc.c on Traverse Ten64 in verbose mode.
    
    No functional changes intended.
    
    MFC after:      3 days
---
 sys/dev/iicbus/rtc/ds1307.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/iicbus/rtc/ds1307.c b/sys/dev/iicbus/rtc/ds1307.c
index e8aa6a258edc..67a753bb3edb 100644
--- a/sys/dev/iicbus/rtc/ds1307.c
+++ b/sys/dev/iicbus/rtc/ds1307.c
@@ -346,7 +346,7 @@ mark_epson_time_valid(struct ds1307_softc *sc)
        if (error) {
                device_printf(dev, "%s cannot read Control 2 register: %d\n",
                    __func__, error);
-               return (false);
+               return (error);
        }
 
        control_mask = (RX8035_CTRL_2_PON | RX8035_CTRL_2_XSTP | 
RX8035_CTRL_2_VDET);
@@ -356,9 +356,9 @@ mark_epson_time_valid(struct ds1307_softc *sc)
        if (error) {
                device_printf(dev, "%s cannot write to Control 2 register: 
%d\n",
                    __func__, error);
-               return (false);
+               return (error);
        }
-       return (true);
+       return (0);
 }
 
 static bool is_dev_time_valid(struct ds1307_softc *sc)

Reply via email to