Re: [PATCH v6 05/17] rtc: rzn1: Fix alarm range check truncation on 32-bit systems
| Newsgroups | org.kernel.vger.linux-rtc,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
> From: Lad Prabhakar <[email protected]> > > alarm and farest were declared as unsigned long, but > rtc_tm_to_time64() returns time64_t (s64). On 32-bit systems where > unsigned long is 32 bits, the assignment silently truncates the upper > 32 bits of the timestamp. > > Fix by declaring alarm and farest as time64_t and replacing > time_after() with a direct signed comparison, which is correct for > time64_t values that will never realistically overflow. > > Signed-off-by: Lad Prabhakar <[email protected]> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5