[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202502231029.mBK5dkZJ-lkp@intel.com>
Date: Sun, 23 Feb 2025 10:50:28 +0800
From: kernel test robot <lkp@...el.com>
To: Danilo Krummrich <dakr@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Alice Ryhl <aliceryhl@...gle.com>,
Daniel Almeida <daniel.almeida@...labora.com>
Subject: rust/helpers/io.c:12:10: error: passing 'volatile void *' to
parameter of type 'void *' discards qualifiers
Hi Danilo,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5cf80612d3f72c46ad53ef5042b4c609c393122f
commit: ce30d94e6855a4f6dc687f658e63c225fcc1d690 rust: add `io::{Io, IoRaw}` base types
date: 9 weeks ago
config: um-randconfig-r113-20250223 (https://download.01.org/0day-ci/archive/20250223/202502231029.mBK5dkZJ-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 204dcafec0ecf0db81d420d2de57b02ada6b09ec)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250223/202502231029.mBK5dkZJ-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/202502231029.mBK5dkZJ-lkp@intel.com/
All errors (new ones prefixed by >>):
***
*** Rust bindings generator 'bindgen' < 0.69.5 together with libclang >= 19.1
*** may not work due to a bug (https://github.com/rust-lang/rust-bindgen/pull/2824),
*** unless patched (like Debian's).
*** Your bindgen version: 0.65.1
*** Your libclang version: 21.0.0
***
***
*** Please see Documentation/rust/quick-start.rst for details
*** on how to set up the Rust support.
***
In file included from rust/helpers/helpers.c:10:
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:8:
In file included from include/linux/cacheflush.h:5:
In file included from arch/um/include/asm/cacheflush.h:4:
In file included from arch/um/include/asm/tlbflush.h:9:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
In file included from rust/helpers/helpers.c:17:
>> rust/helpers/io.c:12:10: error: passing 'volatile void *' to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
12 | iounmap(addr);
| ^~~~
arch/um/include/asm/io.h:19:42: note: passing argument to parameter 'addr' here
19 | static inline void iounmap(void __iomem *addr)
| ^
1 warning and 1 error generated.
make[3]: *** [scripts/Makefile.build:194: rust/helpers/helpers.o] Error 1
clang diag: include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
>> rust/helpers/io.c:12:10: error: passing 'volatile void *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
arch/um/include/asm/io.h:19:42: note: passing argument to parameter 'addr' here
clang diag: include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
make[3]: *** [rust/Makefile:330: rust/bindings/bindings_helpers_generated.rs] Error 101
make[3]: *** Deleting file 'rust/bindings/bindings_helpers_generated.rs'
clang diag: include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
make[3]: Target 'rust/' not remade because of errors.
make[2]: *** [Makefile:1269: prepare] Error 2
make[1]: *** [Makefile:251: __sub-make] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:251: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +12 rust/helpers/io.c
9
10 void rust_helper_iounmap(volatile void __iomem *addr)
11 {
> 12 iounmap(addr);
13 }
14
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists