public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] iio:imu: adis16475: Fix sync mode setting
@ 2024-04-03 11:13 Ramona Gradinariu
  2024-04-03 11:13 ` [PATCH 1/1] " Ramona Gradinariu
  0 siblings, 1 reply; 6+ messages in thread
From: Ramona Gradinariu @ 2024-04-03 11:13 UTC (permalink / raw)
  To: linux-kernel, jic23, nuno.sa, linux-iio; +Cc: Ramona Gradinariu

Fix sync mode setting by applying the necessary shift bits.

Ramona Gradinariu (1):
  iio:imu: adis16475: Fix sync mode setting

 drivers/iio/imu/adis16475.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--
2.34.1


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

* [PATCH 1/1] iio:imu: adis16475: Fix sync mode setting
  2024-04-03 11:13 [PATCH 0/1] iio:imu: adis16475: Fix sync mode setting Ramona Gradinariu
@ 2024-04-03 11:13 ` Ramona Gradinariu
  2024-04-03 13:36   ` Nuno Sá
                     ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ramona Gradinariu @ 2024-04-03 11:13 UTC (permalink / raw)
  To: linux-kernel, jic23, nuno.sa, linux-iio; +Cc: Ramona Gradinariu

Fix sync mode setting by applying the necessary shift bits.

Fixes: fff7352bf7a3 ("iio: imu: Add support for adis16475")
Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com>
---
 drivers/iio/imu/adis16475.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c
index 01f55cc902fa..bd30c3469d9a 100644
--- a/drivers/iio/imu/adis16475.c
+++ b/drivers/iio/imu/adis16475.c
@@ -1351,7 +1351,8 @@ static int adis16475_config_sync_mode(struct adis16475 *st)
 	 * in chip_info.
 	 */
 	ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL,
-				 ADIS16475_SYNC_MODE_MASK, sync->sync_mode);
+				 ADIS16475_SYNC_MODE_MASK,
+				 ADIS16475_SYNC_MODE(sync->sync_mode));
 	if (ret)
 		return ret;
 
-- 
2.34.1


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

* Re: [PATCH 1/1] iio:imu: adis16475: Fix sync mode setting
  2024-04-03 11:13 ` [PATCH 1/1] " Ramona Gradinariu
@ 2024-04-03 13:36   ` Nuno Sá
  2024-04-04 12:35   ` kernel test robot
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Nuno Sá @ 2024-04-03 13:36 UTC (permalink / raw)
  To: Ramona Gradinariu, linux-kernel, jic23, nuno.sa, linux-iio

On Wed, 2024-04-03 at 14:13 +0300, Ramona Gradinariu wrote:
> Fix sync mode setting by applying the necessary shift bits.
> 
> Fixes: fff7352bf7a3 ("iio: imu: Add support for adis16475")
> Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com>
> ---

Ups...

Reviewed-by: Nuno Sa <nuno.sa@analog.com>

>  drivers/iio/imu/adis16475.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c
> index 01f55cc902fa..bd30c3469d9a 100644
> --- a/drivers/iio/imu/adis16475.c
> +++ b/drivers/iio/imu/adis16475.c
> @@ -1351,7 +1351,8 @@ static int adis16475_config_sync_mode(struct adis16475 *st)
>  	 * in chip_info.
>  	 */
>  	ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL,
> -				 ADIS16475_SYNC_MODE_MASK, sync->sync_mode);
> +				 ADIS16475_SYNC_MODE_MASK,
> +				 ADIS16475_SYNC_MODE(sync->sync_mode));
>  	if (ret)
>  		return ret;
>  


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

* Re: [PATCH 1/1] iio:imu: adis16475: Fix sync mode setting
  2024-04-03 11:13 ` [PATCH 1/1] " Ramona Gradinariu
  2024-04-03 13:36   ` Nuno Sá
@ 2024-04-04 12:35   ` kernel test robot
  2024-04-04 13:07   ` kernel test robot
  2024-04-06 15:39   ` Jonathan Cameron
  3 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2024-04-04 12:35 UTC (permalink / raw)
  To: Ramona Gradinariu, linux-kernel, jic23, nuno.sa, linux-iio
  Cc: oe-kbuild-all, Ramona Gradinariu

Hi Ramona,

kernel test robot noticed the following build errors:

[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linus/master v6.9-rc2 next-20240404]
[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/Ramona-Gradinariu/iio-imu-adis16475-Fix-sync-mode-setting/20240403-201755
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/20240403111357.1074511-2-ramona.gradinariu%40analog.com
patch subject: [PATCH 1/1] iio:imu: adis16475: Fix sync mode setting
config: arm64-randconfig-004-20240404 (https://download.01.org/0day-ci/archive/20240404/202404042009.uygCzG2i-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240404/202404042009.uygCzG2i-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404042009.uygCzG2i-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from <command-line>:
   In function 'adis16475_config_sync_mode',
       inlined from 'adis16475_probe' at drivers/iio/imu/adis16475.c:1439:8:
>> include/linux/compiler_types.h:449:45: error: call to '__compiletime_assert_616' declared with attribute error: BUILD_BUG_ON failed: sizeof(({ ({ do { __attribute__((__noreturn__)) extern void __compiletime_assert_611(void) __attribute__((__error__("FIELD_PREP: " "mask is not constant"))); if (!(!(!__builtin_constant_p(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4))))))))) __compiletime_assert_611(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_612(void) __attribute__((__error__("FIELD_PREP: " "mask is zero"))); if (!(!((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) == 0))) __compiletime_assert_612(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_613(void) __attribute__((__error__("FIELD_PREP: " "value too large for the field"))); if (!(!(__builtin_constant_p(sync->sync_mode) ? ~((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) >> (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) - 1)) & (0 + (sync->sync_mode)) : 0))) __compiletime_assert_613(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_614(void) __attribute__((__error__("FIELD_PREP: " "type of reg too small for mask"))); if (!(!(((typeof( _Generic((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, signed short: (unsigned short)0, unsigned int: (unsigned int)0, signed int: (unsigned int)0, unsigned long: (unsigned long)0, signed long: (unsigned long)0, unsigned long long: (unsigned long long)0, signed long long: (unsigned long long)0, default: (((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))))))(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4))))))) > ((typeof( _Generic((0ULL), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, signed short: (unsigned short)0, unsigned int: (unsigned int)0, signed int: (unsigned int)0, unsigned long: (unsigned long)0, signed long: (unsigned long)0, unsigned long long: (unsigned long long)0, signed long long: (unsigned long long)0, default: (0ULL))))(~0ull))))) __compiletime_assert_614(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_615(void) __attribute__((__error__("BUILD_BUG_ON failed: " "(((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) - 1))) & (((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) - 1))) - 1)) != 0"))); if (!(!((((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) - 1))) & (((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) - 1))) - 1)) != 0))) __compiletime_assert_615(); } while (0); }); ((typeof(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))))(sync->sync_mode) << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) - 1)) & (((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))); })) != 2 && sizeof(({ ({ do { __attribute__((__noreturn__)) extern void __compiletime_assert_611(void) __attribute__((__error__("FIELD_PREP: " "mask is not constant"))); if (!(!(!__builtin_constant_p(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4))))))))) __compiletime_assert_611(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_612(void) __attribute__((__error__("FIELD_PREP: " "mask is zero"))); if (!(!((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) == 0))) __compiletime_assert_612(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_613(void) __attribute__((__error__("FIELD_PREP: " "value too large for the field"))); if (!(!(__builtin_constant_p(sync->sync_mode) ? ~((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) >> (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) - 1)) & (0 + (sync->sync_mode)) : 0))) __compiletime_assert_613(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_614(void) __attribute__((__error__("FIELD_PREP: " "type of reg too small for mask"))); if (!(!(((typeof( _Generic((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, signed short: (unsigned short)0, unsigned int: (unsigned int)0, signed int: (unsigned int)0, unsigned long: (unsigned long)0, signed long: (unsigned long)0, unsigned long long: (unsigned long long)0, signed long long: (unsigned long long)0, default: (((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))))))(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4))))))) > ((typeof( _Generic((0ULL), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, signed short: (unsigned short)0, unsigned int: (unsigned int)0, signed int: (unsigned int)0, unsigned long: (unsigned long)0, signed long: (unsigned long)0, unsigned long long: (unsigned long long)0, signed long long: (unsigned long long)0, default: (0ULL))))(~0ull))))) __compiletime_assert_614(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_615(void) __attribute__((__error__("BUILD_BUG_ON failed: " "(((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) - 1))) & (((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) - 1))) - 1)) != 0"))); if (!(!((((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) - 1))) & (((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) - 1))) - 1)) != 0))) __compiletime_assert_615(); } while (0); }); ((typeof(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))))(sync->sync_mode) << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))) - 1)) & (((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> (64 - 1 - (4)))))); })) != 4
     449 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                                             ^
   include/linux/compiler_types.h:430:25: note: in definition of macro '__compiletime_assert'
     430 |                         prefix ## suffix();                             \
         |                         ^~~~~~
   include/linux/compiler_types.h:449:9: note: in expansion of macro '_compiletime_assert'
     449 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   include/linux/iio/imu/adis.h:402:9: note: in expansion of macro 'BUILD_BUG_ON'
     402 |         BUILD_BUG_ON(sizeof(val) != 2 && sizeof(val) != 4);             \
         |         ^~~~~~~~~~~~
   drivers/iio/imu/adis16475.c:1353:15: note: in expansion of macro '__adis_update_bits'
    1353 |         ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL,
         |               ^~~~~~~~~~~~~~~~~~


vim +449 include/linux/compiler_types.h

eb5c2d4b45e3d2 Will Deacon 2020-07-21  435  
eb5c2d4b45e3d2 Will Deacon 2020-07-21  436  #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21  437  	__compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21  438  
eb5c2d4b45e3d2 Will Deacon 2020-07-21  439  /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21  440   * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21  441   * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21  442   * @msg:       a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21  443   *
eb5c2d4b45e3d2 Will Deacon 2020-07-21  444   * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21  445   * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21  446   * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21  447   */
eb5c2d4b45e3d2 Will Deacon 2020-07-21  448  #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @449  	_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21  450  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH 1/1] iio:imu: adis16475: Fix sync mode setting
  2024-04-03 11:13 ` [PATCH 1/1] " Ramona Gradinariu
  2024-04-03 13:36   ` Nuno Sá
  2024-04-04 12:35   ` kernel test robot
@ 2024-04-04 13:07   ` kernel test robot
  2024-04-06 15:39   ` Jonathan Cameron
  3 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2024-04-04 13:07 UTC (permalink / raw)
  To: Ramona Gradinariu, linux-kernel, jic23, nuno.sa, linux-iio
  Cc: oe-kbuild-all, Ramona Gradinariu

Hi Ramona,

kernel test robot noticed the following build errors:

[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linus/master v6.9-rc2 next-20240404]
[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/Ramona-Gradinariu/iio-imu-adis16475-Fix-sync-mode-setting/20240403-201755
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/20240403111357.1074511-2-ramona.gradinariu%40analog.com
patch subject: [PATCH 1/1] iio:imu: adis16475: Fix sync mode setting
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20240404/202404042023.NqdNbrAI-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240404/202404042023.NqdNbrAI-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404042023.NqdNbrAI-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from <command-line>:
   drivers/iio/imu/adis16475.c: In function 'adis16475_config_sync_mode':
>> include/linux/compiler_types.h:449:45: error: call to '__compiletime_assert_494' declared with attribute error: BUILD_BUG_ON failed: sizeof(({ ({ do { __attribute__((__noreturn__)) extern void __compiletime_assert_489(void) __attribute__((__error__("FIELD_PREP: " "mask is not constant"))); if (!(!(!__builtin_constant_p(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4))))))))) __compiletime_assert_489(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_490(void) __attribute__((__error__("FIELD_PREP: " "mask is zero"))); if (!(!((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) == 0))) __compiletime_assert_490(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_491(void) __attribute__((__error__("FIELD_PREP: " "value too large for the field"))); if (!(!(__builtin_constant_p(sync->sync_mode) ? ~((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) >> (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) - 1)) & (0 + (sync->sync_mode)) : 0))) __compiletime_assert_491(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_492(void) __attribute__((__error__("FIELD_PREP: " "type of reg too small for mask"))); if (!(!(((typeof( _Generic((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, signed short: (unsigned short)0, unsigned int: (unsigned int)0, signed int: (unsigned int)0, unsigned long: (unsigned long)0, signed long: (unsigned long)0, unsigned long long: (unsigned long long)0, signed long long: (unsigned long long)0, default: (((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))))))(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4))))))) > ((typeof( _Generic((0ULL), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, signed short: (unsigned short)0, unsigned int: (unsigned int)0, signed int: (unsigned int)0, unsigned long: (unsigned long)0, signed long: (unsigned long)0, unsigned long long: (unsigned long long)0, signed long long: (unsigned long long)0, default: (0ULL))))(~0ull))))) __compiletime_assert_492(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_493(void) __attribute__((__error__("BUILD_BUG_ON failed: " "(((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) - 1))) & (((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) - 1))) - 1)) != 0"))); if (!(!((((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) - 1))) & (((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) - 1))) - 1)) != 0))) __compiletime_assert_493(); } while (0); }); ((typeof(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))))(sync->sync_mode) << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) - 1)) & (((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))); })) != 2 && sizeof(({ ({ do { __attribute__((__noreturn__)) extern void __compiletime_assert_489(void) __attribute__((__error__("FIELD_PREP: " "mask is not constant"))); if (!(!(!__builtin_constant_p(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4))))))))) __compiletime_assert_489(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_490(void) __attribute__((__error__("FIELD_PREP: " "mask is zero"))); if (!(!((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) == 0))) __compiletime_assert_490(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_491(void) __attribute__((__error__("FIELD_PREP: " "value too large for the field"))); if (!(!(__builtin_constant_p(sync->sync_mode) ? ~((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) >> (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) - 1)) & (0 + (sync->sync_mode)) : 0))) __compiletime_assert_491(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_492(void) __attribute__((__error__("FIELD_PREP: " "type of reg too small for mask"))); if (!(!(((typeof( _Generic((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, signed short: (unsigned short)0, unsigned int: (unsigned int)0, signed int: (unsigned int)0, unsigned long: (unsigned long)0, signed long: (unsigned long)0, unsigned long long: (unsigned long long)0, signed long long: (unsigned long long)0, default: (((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))))))(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4))))))) > ((typeof( _Generic((0ULL), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, signed short: (unsigned short)0, unsigned int: (unsigned int)0, signed int: (unsigned int)0, unsigned long: (unsigned long)0, signed long: (unsigned long)0, unsigned long long: (unsigned long long)0, signed long long: (unsigned long long)0, default: (0ULL))))(~0ull))))) __compiletime_assert_492(); } while (0); do { __attribute__((__noreturn__)) extern void __compiletime_assert_493(void) __attribute__((__error__("BUILD_BUG_ON failed: " "(((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) - 1))) & (((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) - 1))) - 1)) != 0"))); if (!(!((((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) - 1))) & (((((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) + (1ULL << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) - 1))) - 1)) != 0))) __compiletime_assert_493(); } while (0); }); ((typeof(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))))(sync->sync_mode) << (__builtin_ffsll(((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))) - 1)) & (((((int)(sizeof(struct { int:(-!!(__builtin_choose_expr( (sizeof(int) == sizeof(*(8 ? ((void *)((long)((2) > (4)) * 0l)) : (int *)8))), (2) > (4), 0))); })))) + (((~((0UL))) - (((1UL)) << (2)) + 1) & (~((0UL)) >> ((8 * 8) - 1 - (4)))))); })) != 4
     449 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                                             ^
   include/linux/compiler_types.h:430:25: note: in definition of macro '__compiletime_assert'
     430 |                         prefix ## suffix();                             \
         |                         ^~~~~~
   include/linux/compiler_types.h:449:9: note: in expansion of macro '_compiletime_assert'
     449 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   include/linux/iio/imu/adis.h:402:9: note: in expansion of macro 'BUILD_BUG_ON'
     402 |         BUILD_BUG_ON(sizeof(val) != 2 && sizeof(val) != 4);             \
         |         ^~~~~~~~~~~~
   drivers/iio/imu/adis16475.c:1353:15: note: in expansion of macro '__adis_update_bits'
    1353 |         ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL,
         |               ^~~~~~~~~~~~~~~~~~


vim +449 include/linux/compiler_types.h

eb5c2d4b45e3d2d Will Deacon 2020-07-21  435  
eb5c2d4b45e3d2d Will Deacon 2020-07-21  436  #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2d Will Deacon 2020-07-21  437  	__compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2d Will Deacon 2020-07-21  438  
eb5c2d4b45e3d2d Will Deacon 2020-07-21  439  /**
eb5c2d4b45e3d2d Will Deacon 2020-07-21  440   * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2d Will Deacon 2020-07-21  441   * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2d Will Deacon 2020-07-21  442   * @msg:       a message to emit if condition is false
eb5c2d4b45e3d2d Will Deacon 2020-07-21  443   *
eb5c2d4b45e3d2d Will Deacon 2020-07-21  444   * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2d Will Deacon 2020-07-21  445   * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2d Will Deacon 2020-07-21  446   * compiler has support to do so.
eb5c2d4b45e3d2d Will Deacon 2020-07-21  447   */
eb5c2d4b45e3d2d Will Deacon 2020-07-21  448  #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2d Will Deacon 2020-07-21 @449  	_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2d Will Deacon 2020-07-21  450  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH 1/1] iio:imu: adis16475: Fix sync mode setting
  2024-04-03 11:13 ` [PATCH 1/1] " Ramona Gradinariu
                     ` (2 preceding siblings ...)
  2024-04-04 13:07   ` kernel test robot
@ 2024-04-06 15:39   ` Jonathan Cameron
  3 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2024-04-06 15:39 UTC (permalink / raw)
  To: Ramona Gradinariu; +Cc: linux-kernel, nuno.sa, linux-iio

On Wed, 3 Apr 2024 14:13:57 +0300
Ramona Gradinariu <ramona.gradinariu@analog.com> wrote:

> Fix sync mode setting by applying the necessary shift bits.
> 
> Fixes: fff7352bf7a3 ("iio: imu: Add support for adis16475")
> Signed-off-by: Ramona Gradinariu <ramona.gradinariu@analog.com>
> ---
>  drivers/iio/imu/adis16475.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c
> index 01f55cc902fa..bd30c3469d9a 100644
> --- a/drivers/iio/imu/adis16475.c
> +++ b/drivers/iio/imu/adis16475.c
> @@ -1351,7 +1351,8 @@ static int adis16475_config_sync_mode(struct adis16475 *st)
>  	 * in chip_info.
>  	 */
>  	ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL,
> -				 ADIS16475_SYNC_MODE_MASK, sync->sync_mode);
> +				 ADIS16475_SYNC_MODE_MASK,
> +				 ADIS16475_SYNC_MODE(sync->sync_mode));
As per the build bots, this is triggering a check on the size the last variable.
See definition of adis_update_bits()
There is even a comment in there to 'beware' of what you hit here.

Easiest is probably to force that with 
 (u16)ADIS16475_SYNC_MODE(sync->sync_mode));
or a local variable.


>  	if (ret)
>  		return ret;
>  


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

end of thread, other threads:[~2024-04-06 15:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-03 11:13 [PATCH 0/1] iio:imu: adis16475: Fix sync mode setting Ramona Gradinariu
2024-04-03 11:13 ` [PATCH 1/1] " Ramona Gradinariu
2024-04-03 13:36   ` Nuno Sá
2024-04-04 12:35   ` kernel test robot
2024-04-04 13:07   ` kernel test robot
2024-04-06 15:39   ` Jonathan Cameron

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