Re: [RFC PATCH 1/2] rtc: rzn1: drop superfluous wday calculation

Wolfram Sang
2024-11-23T08:01:22Z

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

> > struct rzn1_rtc *rtc = dev_get_drvdata(dev);
> > @@ -109,7 +96,6 @@ static int rzn1_rtc_read_time(struct device *dev, struct rtc_time *tm)
> > tm->tm_sec = bcd2bin(tm->tm_sec);
> > tm->tm_min = bcd2bin(tm->tm_min);
> > tm->tm_hour = bcd2bin(tm->tm_hour);
> > - tm->tm_wday = bcd2bin(tm->tm_wday);
>
> With this, you're not even using wday anymore. This is fine as there are
> probably no userspace users of the value but the commit message claims
> it is now using it without conversion.

But it is still read form and written to the register. And the values of
the register go from 0 to 6, same as tm_wday. So not even BCD conversion
is necessary. So, I think it is still used. Am I missing something?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]