[PATCH 0/4] iio: magnetometer: rm3100: Modernize locking and control flow

Maxwell Doose posted 4 patches 1 month, 2 weeks ago
There is a newer version of this series
drivers/iio/magnetometer/rm3100-core.c | 129 +++++++++++--------------
1 file changed, 56 insertions(+), 73 deletions(-)
[PATCH 0/4] iio: magnetometer: rm3100: Modernize locking and control flow
Posted by Maxwell Doose 1 month, 2 weeks ago
The goal of this patch series is to replace the manual mutex_lock() and
mutex_unlock() calls in rm3100-core.c with their more modern
counterparts, guard(mutex)() and scoped_guard(). I've also done some
minor cleanups, removing what are now redundant gotos, and enabling
direct returns.

Following feedback on recent commits, I've learned that it's a better
idea to split changes to be more atomic, and I've done that here in
case any particular change *somehow* causes a build regression. The
changes have been test-compiled however, and according to make, smatch,
and sparse, should be sound.

Maxwell Doose (4):
  iio: magnetometer: rm3100: Use scoped_guard() in rm3100_read_mag()
  iio: magnetometer: rm3100: Use scoped_guard() in
    rm3100_get_samp_freq()
  iio: magnetometer: rm3100: Use guard(mutex)() in
    rm3100_set_samp_freq()
  iio: magnetometer: rm3100: Use scoped_guard in
    rm3100_trigger_handler()

 drivers/iio/magnetometer/rm3100-core.c | 129 +++++++++++--------------
 1 file changed, 56 insertions(+), 73 deletions(-)

-- 
2.53.0