[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202510281304.RK3J3c3t-lkp@intel.com>
Date: Tue, 28 Oct 2025 13:59:54 +0800
From: kernel test robot <lkp@...el.com>
To: Geert Uytterhoeven <geert+renesas@...der.be>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>,
Giovanni Cabiddu <giovanni.cabiddu@...el.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
David Miller <davem@...emloft.net>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>, Joel Stanley <joel@....id.au>,
Andrew Jeffery <andrew@...econstruct.com.au>,
Crt Mori <cmo@...exis.com>, Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Jacky Huang <ychuang3@...oton.com>,
Shan-Chun Hung <schung@...oton.com>,
Yury Norov <yury.norov@...il.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Johannes Berg <johannes@...solutions.net>,
Jakub Kicinski <kuba@...nel.org>, Alex Elder <elder@...e.org>,
David Laight <david.laight.linux@...il.com>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>,
Jason Baron <jbaron@...mai.com>, Borislav Petkov <bp@...en8.de>,
Tony Luck <tony.luck@...el.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
netdev@...r.kernel.org
Subject: Re: [PATCH v5 17/23] iio: mlx90614: Convert to common
field_{get,prep}() helpers
Hi Geert,
kernel test robot noticed the following build warnings:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on next-20251027]
[cannot apply to clk/clk-next geert-renesas-devel/next geert-renesas-drivers/renesas-clk linus/master v6.18-rc3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Geert-Uytterhoeven/clk-at91-pmc-undef-field_-get-prep-before-definition/20251028-025423
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/8ea8d9d6c33d9589e8761f6000639546f1bd5148.1761588465.git.geert%2Brenesas%40glider.be
patch subject: [PATCH v5 17/23] iio: mlx90614: Convert to common field_{get,prep}() helpers
config: hexagon-randconfig-001-20251028 (https://download.01.org/0day-ci/archive/20251028/202510281304.RK3J3c3t-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project e1ae12640102fd2b05bc567243580f90acb1135f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251028/202510281304.RK3J3c3t-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510281304.RK3J3c3t-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/iio/temperature/mlx90614.c:177:10: warning: result of comparison of constant 18446744073709551615 with expression of type 'typeof (_Generic((chip_info->fir_config_mask), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, short: (unsigned short)0, unsigned int: (unsigned int)0, int: (unsigned int)0, unsigned long: (unsigned long)0, long: (unsigned long)0, unsigned long long: (unsigned long long)0, long long: (unsigned long long)0, default: (chip_info->fir_config_mask)))' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
177 | ret |= field_prep(chip_info->fir_config_mask, MLX90614_CONST_FIR);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:256:32: note: expanded from macro 'field_prep'
256 | (__builtin_constant_p(mask) ? FIELD_PREP(mask, val) \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:115:3: note: expanded from macro 'FIELD_PREP'
115 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:72:53: note: expanded from macro '__BF_FIELD_CHECK'
72 | BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) > \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
73 | __bf_cast_unsigned(_reg, ~0ull), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74 | _pfx "type of reg too small for mask"); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:597:22: note: expanded from macro 'compiletime_assert'
597 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:585:23: note: expanded from macro '_compiletime_assert'
585 | __compiletime_assert(condition, msg, prefix, suffix)
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:577:9: note: expanded from macro '__compiletime_assert'
577 | if (!(condition)) \
| ^~~~~~~~~
>> drivers/iio/temperature/mlx90614.c:181:9: warning: result of comparison of constant 18446744073709551615 with expression of type 'typeof (_Generic((chip_info->iir_config_mask), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, short: (unsigned short)0, unsigned int: (unsigned int)0, int: (unsigned int)0, unsigned long: (unsigned long)0, long: (unsigned long)0, unsigned long long: (unsigned long long)0, long long: (unsigned long long)0, default: (chip_info->iir_config_mask)))' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
181 | ret |= field_prep(chip_info->iir_config_mask, i);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:256:32: note: expanded from macro 'field_prep'
256 | (__builtin_constant_p(mask) ? FIELD_PREP(mask, val) \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:115:3: note: expanded from macro 'FIELD_PREP'
115 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:72:53: note: expanded from macro '__BF_FIELD_CHECK'
72 | BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) > \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
73 | __bf_cast_unsigned(_reg, ~0ull), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74 | _pfx "type of reg too small for mask"); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:597:22: note: expanded from macro 'compiletime_assert'
597 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:585:23: note: expanded from macro '_compiletime_assert'
585 | __compiletime_assert(condition, msg, prefix, suffix)
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:577:9: note: expanded from macro '__compiletime_assert'
577 | if (!(condition)) \
| ^~~~~~~~~
drivers/iio/temperature/mlx90614.c:331:9: warning: result of comparison of constant 4294967295 with expression of type 'typeof (_Generic((chip_info->iir_config_mask), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, short: (unsigned short)0, unsigned int: (unsigned int)0, int: (unsigned int)0, unsigned long: (unsigned long)0, long: (unsigned long)0, unsigned long long: (unsigned long long)0, long long: (unsigned long long)0, default: (chip_info->iir_config_mask)))' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
331 | idx = field_get(chip_info->iir_config_mask, ret) -
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:274:32: note: expanded from macro 'field_get'
274 | (__builtin_constant_p(mask) ? FIELD_GET(mask, reg) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:155:3: note: expanded from macro 'FIELD_GET'
155 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:72:53: note: expanded from macro '__BF_FIELD_CHECK'
72 | BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) > \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
73 | __bf_cast_unsigned(_reg, ~0ull), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74 | _pfx "type of reg too small for mask"); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:597:22: note: expanded from macro 'compiletime_assert'
597 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:585:23: note: expanded from macro '_compiletime_assert'
585 | __compiletime_assert(condition, msg, prefix, suffix)
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:577:9: note: expanded from macro '__compiletime_assert'
577 | if (!(condition)) \
| ^~~~~~~~~
3 warnings generated.
vim +177 drivers/iio/temperature/mlx90614.c
fad65a8fe5b85b Vianney le Clément de Saint-Marcq 2015-03-30 141
764589b688a1b0 Crt Mori 2015-08-17 142 /*
3d5ead238bc85e Marek Vasut 2023-05-10 143 * Find the IIR value inside iir_values array and return its position
764589b688a1b0 Crt Mori 2015-08-17 144 * which is equivalent to the bit value in sensor register
764589b688a1b0 Crt Mori 2015-08-17 145 */
764589b688a1b0 Crt Mori 2015-08-17 146 static inline s32 mlx90614_iir_search(const struct i2c_client *client,
764589b688a1b0 Crt Mori 2015-08-17 147 int value)
764589b688a1b0 Crt Mori 2015-08-17 148 {
3d5ead238bc85e Marek Vasut 2023-05-10 149 struct iio_dev *indio_dev = i2c_get_clientdata(client);
3d5ead238bc85e Marek Vasut 2023-05-10 150 struct mlx90614_data *data = iio_priv(indio_dev);
3d5ead238bc85e Marek Vasut 2023-05-10 151 const struct mlx_chip_info *chip_info = data->chip_info;
764589b688a1b0 Crt Mori 2015-08-17 152 int i;
764589b688a1b0 Crt Mori 2015-08-17 153 s32 ret;
764589b688a1b0 Crt Mori 2015-08-17 154
3d5ead238bc85e Marek Vasut 2023-05-10 155 for (i = chip_info->iir_valid_offset;
3d5ead238bc85e Marek Vasut 2023-05-10 156 i < ARRAY_SIZE(chip_info->iir_values);
3d5ead238bc85e Marek Vasut 2023-05-10 157 i++) {
3d5ead238bc85e Marek Vasut 2023-05-10 158 if (value == chip_info->iir_values[i])
764589b688a1b0 Crt Mori 2015-08-17 159 break;
764589b688a1b0 Crt Mori 2015-08-17 160 }
764589b688a1b0 Crt Mori 2015-08-17 161
3d5ead238bc85e Marek Vasut 2023-05-10 162 if (i == ARRAY_SIZE(chip_info->iir_values))
764589b688a1b0 Crt Mori 2015-08-17 163 return -EINVAL;
764589b688a1b0 Crt Mori 2015-08-17 164
764589b688a1b0 Crt Mori 2015-08-17 165 /*
764589b688a1b0 Crt Mori 2015-08-17 166 * CONFIG register values must not be changed so
764589b688a1b0 Crt Mori 2015-08-17 167 * we must read them before we actually write
764589b688a1b0 Crt Mori 2015-08-17 168 * changes
764589b688a1b0 Crt Mori 2015-08-17 169 */
3d5ead238bc85e Marek Vasut 2023-05-10 170 ret = i2c_smbus_read_word_data(client, chip_info->op_eeprom_config1);
1de953e77b8c8b Crt Mori 2015-10-02 171 if (ret < 0)
764589b688a1b0 Crt Mori 2015-08-17 172 return ret;
764589b688a1b0 Crt Mori 2015-08-17 173
3d5ead238bc85e Marek Vasut 2023-05-10 174 /* Modify FIR on parts which have configurable FIR filter */
3d5ead238bc85e Marek Vasut 2023-05-10 175 if (chip_info->fir_config_mask) {
3d5ead238bc85e Marek Vasut 2023-05-10 176 ret &= ~chip_info->fir_config_mask;
3d5ead238bc85e Marek Vasut 2023-05-10 @177 ret |= field_prep(chip_info->fir_config_mask, MLX90614_CONST_FIR);
3d5ead238bc85e Marek Vasut 2023-05-10 178 }
3d5ead238bc85e Marek Vasut 2023-05-10 179
3d5ead238bc85e Marek Vasut 2023-05-10 180 ret &= ~chip_info->iir_config_mask;
3d5ead238bc85e Marek Vasut 2023-05-10 @181 ret |= field_prep(chip_info->iir_config_mask, i);
1de953e77b8c8b Crt Mori 2015-10-02 182
764589b688a1b0 Crt Mori 2015-08-17 183 /* Write changed values */
3d5ead238bc85e Marek Vasut 2023-05-10 184 ret = mlx90614_write_word(client, chip_info->op_eeprom_config1, ret);
764589b688a1b0 Crt Mori 2015-08-17 185 return ret;
764589b688a1b0 Crt Mori 2015-08-17 186 }
764589b688a1b0 Crt Mori 2015-08-17 187
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists