* [leon-rdma:rxe-rust-v1 65/106] rust/helpers/net/device.c:36:9: error: invalid application of 'sizeof' to bit-field
@ 2026-10-14 3:26 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-14 3:26 UTC (permalink / raw)
To: Leon Romanovsky; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rxe-rust-v1
head: bb839a6cc0506a07f63d8931ee7cf500e82f362a
commit: 5909e537a0a6265f69309aac377dd5ab2a3672c4 [65/106] rust: net: Add borrowed network devices and notifier registrations
config: um-randconfig-r2300-20261014 (https://download.01.org/0day-ci/archive/20261014/202610140512.pBbObSbF-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 285b36e5f279398c8a8f6081bee88a5e105ee07f)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261014/202610140512.pBbObSbF-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/202610140512.pBbObSbF-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from kernel/sched/rq-offsets.c:5:
In file included from kernel/sched/sched.h:28:
In file included from include/linux/cgroup_api.h:1:
In file included from include/linux/cgroup.h:27:
In file included from include/linux/kernel_stat.h:8:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/um/include/asm/hardirq.h:24:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:12:
In file included from arch/um/include/asm/io.h:24:
include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
1209 | return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
| ~~~~~~~~~~ ^
1 warning generated.
In file included from rust/helpers/helpers.c:48:
In file included from rust/helpers/blk.c:3:
In file included from include/linux/blk-mq.h:5:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:11:
In file included from arch/um/include/asm/hardirq.h:24:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:12:
In file included from arch/um/include/asm/io.h:24:
include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
1209 | return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
| ~~~~~~~~~~ ^
In file included from rust/helpers/helpers.c:80:
>> rust/helpers/net/device.c:36:9: error: invalid application of 'sizeof' to bit-field
36 | return READ_ONCE(dev->priv_flags) & IFF_802_1Q_VLAN;
| ^
include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
49 | compiletime_assert_rwonce_type(x); \
| ^
include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^
include/linux/compiler_types.h:663:9: note: expanded from macro '__native_word'
663 | (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
| ^
In file included from rust/helpers/helpers.c:80:
>> rust/helpers/net/device.c:36:9: error: invalid application of 'sizeof' to bit-field
include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
49 | compiletime_assert_rwonce_type(x); \
| ^
include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^
include/linux/compiler_types.h:663:38: note: expanded from macro '__native_word'
663 | (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
| ^
In file included from rust/helpers/helpers.c:80:
>> rust/helpers/net/device.c:36:9: error: invalid application of 'sizeof' to bit-field
include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
49 | compiletime_assert_rwonce_type(x); \
| ^
include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^
include/linux/compiler_types.h:664:9: note: expanded from macro '__native_word'
664 | sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
| ^
In file included from rust/helpers/helpers.c:80:
>> rust/helpers/net/device.c:36:9: error: invalid application of 'sizeof' to bit-field
include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
49 | compiletime_assert_rwonce_type(x); \
| ^
include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^
include/linux/compiler_types.h:664:37: note: expanded from macro '__native_word'
664 | sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
| ^
In file included from rust/helpers/helpers.c:80:
>> rust/helpers/net/device.c:36:9: error: invalid application of 'sizeof' to bit-field
include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
49 | compiletime_assert_rwonce_type(x); \
| ^
include/asm-generic/rwonce.h:36:47: note: expanded from macro 'compiletime_assert_rwonce_type'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^
In file included from rust/helpers/helpers.c:80:
>> rust/helpers/net/device.c:36:9: error: address of bit-field requested
36 | return READ_ONCE(dev->priv_flags) & IFF_802_1Q_VLAN;
| ^ ~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:50:2: note: expanded from macro 'READ_ONCE'
50 | __READ_ONCE(x); \
| ^ ~
include/asm-generic/rwonce.h:44:70: note: expanded from macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^ ~
In file included from rust/helpers/helpers.c:80:
>> rust/helpers/net/device.c:36:9: error: invalid application of 'typeof_unqual' to bit-field
include/asm-generic/rwonce.h:50:2: note: expanded from macro 'READ_ONCE'
50 | __READ_ONCE(x); \
| ^
include/asm-generic/rwonce.h:44:42: note: expanded from macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/compiler_types.h:635:52: note: expanded from macro '__unqual_scalar_typeof'
635 | #define __unqual_scalar_typeof(x) __typeof_unqual__(x)
| ^
1 warning and 7 errors generated.
make[3]: *** [rust/Makefile:729: rust/helpers/helpers.o] Error 1 shuffle=2284638678
clang diag: include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
clang diag: include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
>> include/linux/compiler_types.h:663:9: error: invalid application of 'sizeof' to bit-field
include/linux/compiler_types.h:663:38: error: invalid application of 'sizeof' to bit-field
include/linux/compiler_types.h:664:9: error: invalid application of 'sizeof' to bit-field
include/linux/compiler_types.h:664:37: error: invalid application of 'sizeof' to bit-field
>> include/asm-generic/rwonce.h:36:47: error: invalid application of 'sizeof' to bit-field
>> include/asm-generic/rwonce.h:44:70: error: address of bit-field requested
>> include/linux/compiler_types.h:635:52: error: invalid application of 'typeof_unqual' to bit-field
clang diag: include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
>> Unable to generate bindings: clang diagnosed error: include/linux/compiler_types.h:663:9: error: invalid application of 'sizeof' to bit-field
include/linux/compiler_types.h:663:38: error: invalid application of 'sizeof' to bit-field
include/linux/compiler_types.h:664:9: error: invalid application of 'sizeof' to bit-field
include/linux/compiler_types.h:664:37: error: invalid application of 'sizeof' to bit-field
>> include/asm-generic/rwonce.h:36:47: error: invalid application of 'sizeof' to bit-field
>> include/asm-generic/rwonce.h:44:70: error: address of bit-field requested
>> include/linux/compiler_types.h:635:52: error: invalid application of 'typeof_unqual' to bit-field
vim +/sizeof +36 rust/helpers/net/device.c
32
33 __rust_helper bool rust_helper_is_vlan_dev(const struct net_device *dev)
34 {
35 #if IS_ENABLED(CONFIG_VLAN_8021Q)
> 36 return READ_ONCE(dev->priv_flags) & IFF_802_1Q_VLAN;
37 #else
38 return false;
39 #endif
40 }
41
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-14 3:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14 3:26 [leon-rdma:rxe-rust-v1 65/106] rust/helpers/net/device.c:36:9: error: invalid application of 'sizeof' to bit-field kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.