mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/2] iio: magnetometer: bmc150: use FIELD_PREP and FIELD_GET helpers
@ 2026-06-10  4:24 Hungyu Lin
  2026-06-10  4:24 ` [PATCH 1/2] iio: magnetometer: bmc150: sort includes Hungyu Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Hungyu Lin @ 2026-06-10  4:24 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: David Lechner, Nuno Sá,
	Andy Shevchenko, linux-iio, linux-kernel, Hungyu Lin

Replace open-coded bitfield operations with FIELD_PREP() and
FIELD_GET() helpers where appropriate.

Also simplify bmc150_magn_set_odr() by returning directly from
the matching table entry.

v4:
 - Split include sorting into a separate prerequisite patch
 - Remove the extra blank line in bmc150_magn_get_odr()

v3:
 - Add missing include <linux/bitfield.h>

v2:
 - Use FIELD_PREP() and FIELD_GET() helpers as suggested by
   Jonathan Cameron
 - Simplify bmc150_magn_set_odr() by returning directly from
   the matching table entry

Hungyu Lin (2):
  iio: magnetometer: bmc150: sort includes
  iio: magnetometer: bmc150: use FIELD_PREP and FIELD_GET helpers

 drivers/iio/magnetometer/bmc150_magn.c | 50 +++++++++++++-------------
 1 file changed, 24 insertions(+), 26 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-06-10 13:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-10  4:24 [PATCH v4 0/2] iio: magnetometer: bmc150: use FIELD_PREP and FIELD_GET helpers Hungyu Lin
2026-06-10  4:24 ` [PATCH 1/2] iio: magnetometer: bmc150: sort includes Hungyu Lin
2026-06-10 10:55   ` Andy Shevchenko
2026-06-10  4:24 ` [PATCH 2/2] iio: magnetometer: bmc150: use FIELD_PREP and FIELD_GET helpers Hungyu Lin
2026-06-10  4:45   ` Hungyu Lin
2026-06-10 10:56   ` Andy Shevchenko
2026-06-10 13:58     ` Hungyu Lin
2026-06-10 10:57 ` [PATCH v4 0/2] " Andy Shevchenko

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

all inboxes | Powered by JetHome®