Re: [PATCH v6 7/8] iio: adc: at91_adc: use HZ_PER_KHZ instead of raw 1000
From: Andy Shevchenko
Date: Fri Dec 04 2026 - 09:52:09 EST
On Fri, Dec 04, 2026 at 02:33:02PM +0000, David Laight wrote:
> On Thu, 03 Dec 2026 19:30:11 +0200
> Abdelnasser Hussein <abdelnasserhussein11@xxxxxxxxx> wrote:
...
> > - adc_clk_khz = adc_clk / 1000;
> > + adc_clk_khz = adc_clk / HZ_PER_KHZ;
>
> That doesn't seem to be the correct name for the division.
> HZ_PER_KHZ is (named) for converting between Hz and kHz,
> but you are converting between MHz and kHz so it is worse than
> the literal 1000.
Can you elaborate? adc_clk is in Hz, and dividing by 1000 (HZ_PER_KHZ)
we convert the Hz to kHz.
--
With Best Regards,
Andy Shevchenko