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

Dan Carpenter
2026-04-11T10:52:55Z

On Sat, Apr 11, 2026 at 12:47:42PM +0200, Joshua Crofts wrote:
> 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.

We're not the boss of you. Do whatever you want to. :P

regards,
dan carpenter