Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH v2 0/4] correct macro issues
@ 2026-03-06  7:16 Michael Harris
  2026-03-06  7:16 ` [PATCH v2 1/4] staging: iio: adt7316: refactor temperature calculation logic Michael Harris
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Michael Harris @ 2026-03-06  7:16 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Greg Kroah-Hartman
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, linux-iio,
	linux-staging, linux-kernel, Michael Harris

This patch series fixes various issues with the macros definitions, such
as:
- Config macro names that don't indicate which config it's for
- Magic numbers
- Mask values being before the mask itself

Additionally, some macros are outright removed due to having better
modern standards:
- Offset/shift macros are replaced with the use of FIELD_GET(),
  FIELD_PREP(), or FIELD_FIT()
- Macros used for custom sign manipulation are replaced with
  sign_extend32()

---
Changes in v2:
- Delete "remove unused macros" patch
- Add a patch that fixes manual temperature calculation and deletes the
  associated macros
- Add a patch that removes offset/shift macros
- Add a patch that adds the associated config to
  macro names and adjusts ordering so that mask values are below the
  mask itself
- Use GENMASK_U32() and BIT_U32() instead of GENMASK() and BIT(), to
  prevent sysfs_emit() from expecting unsigned long (thanks to David
  Laight for this suggestion)
- Corrected macros that were incorrectly using BIT() or GENMASK()
- Change the cover letter description to better fit all the new patches
- Link to v1: https://lore.kernel.org/r/20260130-adt7316-correct-macros-v1-0-8a71df1e42f1@gmail.com

---
Michael Harris (4):
      staging: iio: adt7316: refactor temperature calculation logic
      staging: iio: adt7316: remove shift/offset macros
      staging: iio: adt7316: add config names to registers and reorder
      staging: iio: adt7316: convert magic numbers to BIT_U32() or GENMASK_U32()

 drivers/staging/iio/addac/adt7316.c | 384 +++++++++++++++++++-----------------
 1 file changed, 203 insertions(+), 181 deletions(-)
---
base-commit: 5d2905f2c6acdd1c553f9b022dee730ab2cced71
change-id: 20260130-adt7316-correct-macros-b6801b4ae1b1

Best regards,
-- 
Michael Harris <michaelharriscode@gmail.com>


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

end of thread, other threads:[~2026-03-10 11:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06  7:16 [PATCH v2 0/4] correct macro issues Michael Harris
2026-03-06  7:16 ` [PATCH v2 1/4] staging: iio: adt7316: refactor temperature calculation logic Michael Harris
2026-03-06 14:51   ` Andy Shevchenko
2026-03-07 11:33   ` Jonathan Cameron
2026-03-06  7:16 ` [PATCH v2 2/4] staging: iio: adt7316: remove shift/offset macros Michael Harris
2026-03-06 14:53   ` Andy Shevchenko
2026-03-10  1:32     ` Michael Harris
2026-03-10 11:29       ` Andy Shevchenko
2026-03-07 11:30   ` Jonathan Cameron
2026-03-06  7:17 ` [PATCH v2 3/4] staging: iio: adt7316: add config names to registers and reorder Michael Harris
2026-03-06 15:04   ` Andy Shevchenko
2026-03-06  7:17 ` [PATCH v2 4/4] staging: iio: adt7316: convert magic numbers to BIT_U32() or GENMASK_U32() Michael Harris
2026-03-06 15:05   ` Andy Shevchenko
2026-03-07 11:33   ` Jonathan Cameron

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