lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260208011659.53722-1-neelb2403@gmail.com>
Date: Sat,  7 Feb 2026 20:16:57 -0500
From: Neel Bullywon <neelb2403@...il.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: David Lechner <dlechner@...libre.com>,
	Nuno Sá <nuno.sa@...log.com>,
	Andy Shevchenko <andy@...nel.org>,
	linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Neel Bullywon <neelb2403@...il.com>
Subject: [PATCH v5 0/2] iio: magnetometer: bmc150_magn: cleanup and formatting

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ