Re: [PATCH v4] iio: chemical: sps30: Replace manual locking with RAII locking
From: Stepan Ionichev
Date: Wed May 20 2026 - 08:23:16 EST
The hunk in sps30_read_raw() adds an empty line before "default:" in
the switch, which is unrelated to the RAII conversion and probably
worth dropping.
Also, moving guard(mutex) into sps30_do_meas() changes its contract:
previously callers had to hold state->lock around the call, now the
function takes it itself. A line in the commit log would help future
readers avoid the obvious "I'll just wrap it in mutex_lock()" pitfall.
Stepan