public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/2] iio: magnetometer: bmc150_magn: cleanup and formatting
@ 2026-02-08  1:16 Neel Bullywon
  2026-02-08  1:16 ` [PATCH v5 1/2] iio: magnetometer: bmc150_magn: use automated cleanup for mutex Neel Bullywon
  2026-02-08  1:16 ` [PATCH v5 2/2] iio: magnetometer: bmc150_magn: minor formatting cleanup Neel Bullywon
  0 siblings, 2 replies; 6+ messages in thread
From: Neel Bullywon @ 2026-02-08  1:16 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, linux-iio,
	linux-kernel, Neel Bullywon

This v5 series refactors the bmc150_magn driver to use automated cleanup
helpers for mutex operations and modernizes the delay function usage.

Changes in v5:
- Split into two patches as requested by maintainer:
  - Patch 1/2: All functional changes (guard/scoped_guard, fsleep)
  - Patch 2/2: Pure formatting/style cleanups
- Use scoped_guard() instead of { guard(); ... } for short scopes
- Left trigger_handler unchanged per maintainer feedback
- Use fsleep() instead of usleep_range() per maintainer feedback
- Dropped formatting changes that did not improve readability
- Added braces around guard() in case blocks for clear scope

Changes in v4:
- Replace scoped_guard() with guard() to avoid lexical scope issues with goto
  and return values which caused logic errors in previous versions.
- Replace msleep(5) with usleep_range(5000, 6000) to avoid checkpatch
  warning.
- Fix indentation and line wrapping to cleanliness.
- Extend guard() usage to all mutex_lock() instances in the driver.

Changes in v3:
- Add Reviewed-by tags.

Changes in v2:
- Use guard() for mutex protection in bmc150_magn_data_rdy_trigger_set_state.

[Patch 1/2] Converts manual mutex_lock/unlock patterns to guard() and
scoped_guard() helpers, and replaces msleep(5) with fsleep(5000).

[Patch 2/2] Adds spaces inside braces for initializer lists and fixes
scan_masks array indentation. No functional changes.

Neel Bullywon (2):
  iio: magnetometer: bmc150_magn: use automated cleanup for mutex
  iio: magnetometer: bmc150_magn: minor formatting cleanup

 drivers/iio/magnetometer/bmc150_magn.c | 161 +++++++++++--------------
 1 file changed, 69 insertions(+), 92 deletions(-)

-- 
2.44.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-02-08 13:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-08  1:16 [PATCH v5 0/2] iio: magnetometer: bmc150_magn: cleanup and formatting Neel Bullywon
2026-02-08  1:16 ` [PATCH v5 1/2] iio: magnetometer: bmc150_magn: use automated cleanup for mutex Neel Bullywon
2026-02-08  5:14   ` Ethan Tidmore
2026-02-08 13:32   ` Andy Shevchenko
2026-02-08  1:16 ` [PATCH v5 2/2] iio: magnetometer: bmc150_magn: minor formatting cleanup Neel Bullywon
2026-02-08 13:35   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox