Re: [PATCH v2] iio: chemical: scd30: Replace manual locking with RAII locking
From: Stepan Ionichev
Date: Wed May 20 2026 - 08:20:06 EST
The "_locked" suffix in scd30_trigger_handler_helper_locked() reads as
"caller holds the lock" by the usual kernel convention, but the helper
takes state->lock itself via guard(mutex). Dropping the suffix (or
renaming to e.g. scd30_read_meas_data()) would match the actual
ownership.
Also, the int arr_size argument is forwarded straight to memcpy()
so it is really a byte count, not an array length -- size_t bytes
would describe it more accurately and avoid a future caller passing
ARRAY_SIZE().
Stepan