Re: [RESEND PATCH v2 2/2] iio: frequency: ad9832: simplify bitwise math

Joshua Crofts
2026-04-11T10:47:56Z

On Sat, 11 Apr 2026 at 12:38, Dan Carpenter <error27@gmail.com> wrote:
> > static unsigned long ad9832_calc_freqreg(unsigned long mclk, unsigned long fout)
> > {
> > - unsigned long long freqreg = (u64)fout *
> > - (u64)((u64)1L << AD9832_FREQ_BITS);
> > + u64 freqreg = (u64)fout * BIT_ULL(AD9832_FREQ_BITS)i;
> ^
> This extra i char is something I really dread as a vim user. :P

Damn, that's embarrassing... Should I wait 24 hours before submitting a fix
even if it's this trivial? Thanks.

--
Kind regards

CJD