Re: [PATCH v2] hwmon: add driver for ARCTIC Fan Controller
From: Aureo Serrano
Date: Tue Mar 17 2026 - 00:21:48 EST
On 2026-03-13 18:41:38+0100, Thomas Weißschuh wrote:
> > +#define ARCTIC_ACK_TIMEOUT_MS 1000
>
> One second is a very long time. How long does the device take in
> practice?
Measured over 500 iterations: min ~32 ms, average ~100 ms, max ~563 ms.
The latency is a characteristic of the device firmware and cannot be
changed at this stage. I can change ARCTIC_ACK_TIMEOUT_MS from 1000 to 700.
Does it work for you?
> > + memset(buf + 11, 0, ARCTIC_REPORT_LEN - 11);
>
> The magic '11' should be '1 + ARCTIC_NUM_FANS'.
> Or even easier, use kzalloc() above.
Since the buffer is now struct-embedded and devm_kzalloc zeroes the struct
at allocation, bytes 11-31 are always zero and the memset is not needed at
all. This also addresses the suggestion from another reviewer to use a
single once-allocated buffer rather than allocating per write. Hope that is
acceptable.