Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: frequency: adf4350: replace TODO with NOTE in adf4350_set_freq()

Replace the TODO comment in adf4350_set_freq() with a NOTE explaining
that a constant-time approach using fls_long() was attempted but deemed
more complex without meaningful benefit for initialization code.

Signed-off-by: Neel Bullywon <neelb2403@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Neel Bullywon and committed by
Jonathan Cameron
8abf158b 8625d418

+4 -4
+4 -4
drivers/iio/frequency/adf4350.c
··· 152 152 st->r4_rf_div_sel = 0; 153 153 154 154 /* 155 - * !\TODO: The below computation is making sure we get a power of 2 156 - * shift (st->r4_rf_div_sel) so that freq becomes higher or equal to 157 - * ADF4350_MIN_VCO_FREQ. This might be simplified with fls()/fls_long() 158 - * and friends. 155 + * NOTE: This iteratively shifts freq by a power of 2 156 + * (st->r4_rf_div_sel) to meet or exceed ADF4350_MIN_VCO_FREQ. 157 + * A constant-time approach using fls_long() was attempted but 158 + * deemed more complex without meaningful benefit for init code. 159 159 */ 160 160 while (freq < ADF4350_MIN_VCO_FREQ) { 161 161 freq <<= 1;