Linux IIO development
 help / color / mirror / Atom feed
* [Bug 221442] New: Compile time assert error on iio/opt4001: FIELD_PREP: value too large for the field
@ 2026-04-30 16:55 bugzilla-daemon
  0 siblings, 0 replies; only message in thread
From: bugzilla-daemon @ 2026-04-30 16:55 UTC (permalink / raw)
  To: linux-iio

https://bugzilla.kernel.org/show_bug.cgi?id=221442

            Bug ID: 221442
           Summary: Compile time assert error on iio/opt4001: FIELD_PREP:
                    value too large for the field
           Product: Drivers
           Version: 2.5
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: IIO
          Assignee: drivers_iio@kernel-bugs.kernel.org
          Reporter: lito.15@proton.me
        Regression: No

When compiling one of the drivers (config was gotten with `zcat
/proc/config.gz` on Arch Linux), compilation fails with an assert:

```
drivers/iio/light/opt4001.c:215:9: error: call to '__compiletime_assert_528'
declared with 'error'
      attribute: FIELD_PREP: value too large for the field
  215 |         reg |= FIELD_PREP(OPT4001_CTRL_CONV_TIME_MASK, chip->int_time);
      |                ^
./include/linux/bitfield.h:138:3: note: expanded from macro 'FIELD_PREP'
  138 |                 __FIELD_PREP(_mask, _val, "FIELD_PREP: ");             
\
      |                 ^
./include/linux/bitfield.h:91:3: note: expanded from macro '__FIELD_PREP'
   91 |                 __BF_FIELD_CHECK_MASK(mask, val, pfx);                 
\
      |                 ^
./include/linux/bitfield.h:70:3: note: expanded from macro
'__BF_FIELD_CHECK_MASK'
   70 |                 BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ?          
\
      |                 ^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see
all)
././include/linux/compiler_types.h:694:2: note: expanded from macro
'_compiletime_assert'
  694 |         __compiletime_assert(condition, msg, prefix, suffix)
      |         ^
././include/linux/compiler_types.h:687:4: note: expanded from macro
'__compiletime_assert'
  687 |                         prefix ## suffix();                            
\
      |                         ^
<scratch space>:18:1: note: expanded from here
   18 | __compiletime_assert_528
      | ^
1 error generated.
make[5]: *** [scripts/Makefile.build:289: drivers/iio/light/opt4001.o] Error 1
make[4]: *** [scripts/Makefile.build:548: drivers/iio/light] Error 2
make[3]: *** [scripts/Makefile.build:548: drivers/iio] Error 2
make[2]: *** [scripts/Makefile.build:548: drivers] Error 2
make[1]: *** [/home/lito/linux-7.0.2/Makefile:2103: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
exit 2
```

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-30 16:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30 16:55 [Bug 221442] New: Compile time assert error on iio/opt4001: FIELD_PREP: value too large for the field bugzilla-daemon

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