]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: mlx90614: #undef field_{get,prep}() before local definition
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 6 Nov 2025 13:33:54 +0000 (14:33 +0100)
committerYury Norov (NVIDIA) <yury.norov@gmail.com>
Mon, 24 Nov 2025 19:15:46 +0000 (14:15 -0500)
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>
Acked-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
drivers/iio/temperature/mlx90614.c

index 8a44a00bfd5ece3899caae88ed35cc40a2dc3db8..de5615fdb396aa3c449a14fe8f7f872731d394e4 100644 (file)
@@ -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 {