Re: [PATCH 3/3] rtc: rzn1: support input frequencies other than 32768Hz

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

 



> > +               if (rate < 32000 || rate > BIT(22)) {
> 
> Perhaps
> 
>     #define RTCA0SCMP_MIN    32000
>     #define RTCA0SCMP_MASK    GEN_MASK(21. 0)
> 
> and
> 
>     if (rate < RTCA0SCMP_MIN || rate > FIELD_MAX(RTCA0SCMP_MASK) + 1)
> 
> ?

You really think this is more readable than the original code? I am
really tired of bike-shedding so I don't care much, but I do wonder...

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux