Thread (55 messages) 55 messages, 10 authors, 2025-11-19
STALE192d
Revisions (2)
  1. v5 [diff vs current]
  2. v6 current

[PATCH v6 06/26] iio: mlx90614: #undef field_{get,prep}() before local definition

From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: 2025-11-06 13:35:34
Also in: linux-clk, linux-crypto, linux-edac, linux-gpio, linux-iio, linux-renesas-soc, linux-sound, lkml
Subsystem: iio subsystem and drivers, melexis mlx90614 driver, the rest · Maintainers: Jonathan Cameron, Crt Mori, Linus Torvalds

Prepare for the advent of globally available common field_get() and
field_prep() macros by undefining the symbols before defining local
variants.  This prevents redefinition warnings from the C preprocessor
when introducing the common macros later.

Suggested-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v6:
  - No changes,

v5:
  - New.
---
 drivers/iio/temperature/mlx90614.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/iio/temperature/mlx90614.c b/drivers/iio/temperature/mlx90614.c
index 8a44a00bfd5ece38..de5615fdb396aa3c 100644
--- a/drivers/iio/temperature/mlx90614.c
+++ b/drivers/iio/temperature/mlx90614.c
@@ -69,7 +69,9 @@
 #define MLX90614_CONST_FIR 0x7 /* Fixed value for FIR part of low pass filter */
 
 /* Non-constant mask variant of FIELD_GET() and FIELD_PREP() */
+#undef field_get
 #define field_get(_mask, _reg)	(((_reg) & (_mask)) >> (ffs(_mask) - 1))
+#undef field_prep
 #define field_prep(_mask, _val)	(((_val) << (ffs(_mask) - 1)) & (_mask))
 
 struct mlx_chip_info {
-- 
2.43.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help