From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: Gary Guo <gary@garyguo.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: build failure after merge of the rust tree
Date: Mon, 11 Nov 2024 17:58:42 +1100 [thread overview]
Message-ID: <20241111175842.550fc29d@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 4961 bytes --]
Hi all,
My first rust build error! ;-)
After merging the rust tree, today's linux-next build (x86_64
allmodconfig) failed like this:
error[E0308]: mismatched types
--> rust/kernel/device.rs:176:17
|
175 | bindings::_dev_printk(
| --------------------- arguments to this function are incorrect
176 | klevel as *const _ as *const core::ffi::c_char,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*const u8`, found `*const i8`
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
note: function defined here
--> /home/sfr/next/x86_64_allmodconfig/rust/bindings/bindings_generated.rs:60521:12
|
60521 | pub fn _dev_printk(level: *const ffi::c_char, dev: *const device, fmt: *const ffi::c_char, ...);
| ^^^^^^^^^^^
error[E0308]: mismatched types
--> rust/kernel/miscdevice.rs:159:52
|
159 | unlocked_ioctl: maybe_fn(T::HAS_IOCTL, fops_ioctl::<T>),
| -------- ^^^^^^^^^^^^^^^ expected fn pointer, found fn item
| |
| arguments to this function are incorrect
|
= note: expected fn pointer `unsafe extern "C" fn(_, _, usize) -> isize`
found fn item `unsafe extern "C" fn(_, _, u64) -> i64 {fops_ioctl::<T>}`
help: the return type of this call is `unsafe extern "C" fn(*mut bindings::file, u32, u64) -> i64 {fops_ioctl::<T>}` due to the type of the argument passed
--> rust/kernel/miscdevice.rs:159:29
|
159 | unlocked_ioctl: maybe_fn(T::HAS_IOCTL, fops_ioctl::<T>),
| ^^^^^^^^^^^^^^^^^^^^^^^---------------^
| |
| this argument influences the return type of `maybe_fn`
note: function defined here
--> rust/kernel/miscdevice.rs:144:14
|
144 | const fn maybe_fn<T: Copy>(check: bool, func: T) -> Option<T> {
| ^^^^^^^^ -------
error[E0308]: mismatched types
--> rust/kernel/miscdevice.rs:162:22
|
162 | Some(fops_compat_ioctl::<T>)
| ---- ^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
| |
| arguments to this enum variant are incorrect
|
= note: expected fn pointer `unsafe extern "C" fn(_, _, usize) -> isize`
found fn item `unsafe extern "C" fn(_, _, u64) -> i64 {fops_compat_ioctl::<T>}`
help: the type constructed contains `unsafe extern "C" fn(*mut bindings::file, u32, u64) -> i64 {fops_compat_ioctl::<T>}` due to the type of the argument passed
--> rust/kernel/miscdevice.rs:162:17
|
162 | Some(fops_compat_ioctl::<T>)
| ^^^^^----------------------^
| |
| this argument influences the type of `Some`
note: tuple variant defined here
--> /usr/lib/rustlib/src/rust/library/core/src/option.rs:579:5
|
579 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
error[E0308]: mismatched types
--> rust/kernel/security.rs:36:13
|
32 | to_result(unsafe { bindings::security_secid_to_secctx(secid, &mut secdata, &mut seclen) })?;
| ------- here the type of `secdata` is inferred to be `*mut u8`
...
36 | secdata,
| ^^^^^^^ expected `*mut i8`, found `*mut u8`
|
= note: expected raw pointer `*mut i8`
found raw pointer `*mut u8`
error[E0308]: mismatched types
--> rust/kernel/security.rs:72:52
|
72 | unsafe { bindings::security_release_secctx(self.secdata, self.seclen as u32) };
| --------------------------------- ^^^^^^^^^^^^ expected `*mut u8`, found `*mut i8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*mut u8`
found raw pointer `*mut i8`
note: function defined here
--> /home/sfr/next/x86_64_allmodconfig/rust/bindings/bindings_generated.rs:87586:12
|
87586 | pub fn security_release_secctx(secdata: *mut ffi::c_char, seclen: u32_);
| ^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0308`.
Presumably caused by my merge resolutions involving commit
d072acda4862 ("rust: use custom FFI integer types")
I have used the rust tree from next-20241108 for today.
Any help with the merge resolutions would be much appreciated.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2024-11-11 6:58 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 6:58 Stephen Rothwell [this message]
2024-11-11 8:16 ` linux-next: build failure after merge of the rust tree Miguel Ojeda
2024-11-11 8:28 ` Miguel Ojeda
2024-11-11 14:15 ` Gary Guo
2024-11-11 23:08 ` Miguel Ojeda
2024-11-11 23:58 ` Miguel Ojeda
2024-11-12 1:29 ` Stephen Rothwell
2024-11-12 6:30 ` Stephen Rothwell
2024-11-12 8:50 ` Miguel Ojeda
-- strict thread matches above, loose matches on Subject: below --
2025-11-17 8:04 Stephen Rothwell
2025-11-17 11:19 ` Alexandre Courbot
2025-11-17 14:51 ` Alice Ryhl
2025-11-17 15:37 ` Tamir Duberstein
2025-11-17 16:11 ` Alice Ryhl
2025-06-24 7:31 Stephen Rothwell
2025-06-24 10:31 ` Miguel Ojeda
2025-06-24 11:12 ` Danilo Krummrich
2025-06-24 12:29 ` Miguel Ojeda
2025-06-24 12:00 ` Danilo Krummrich
2025-06-24 12:14 ` Alexandre Courbot
2025-06-24 12:16 ` Tamir Duberstein
2025-06-24 12:24 ` Alexandre Courbot
2025-06-24 12:29 ` Tamir Duberstein
2025-06-24 12:25 ` Miguel Ojeda
2025-05-27 9:42 Stephen Rothwell
2025-05-27 10:03 ` Miguel Ojeda
2025-05-12 9:40 Stephen Rothwell
2025-05-12 11:52 ` Miguel Ojeda
2025-03-24 10:57 Stephen Rothwell
2025-03-24 11:06 ` Stephen Rothwell
2025-03-24 11:59 ` Danilo Krummrich
2025-03-24 13:29 ` Greg KH
2025-03-24 13:43 ` Danilo Krummrich
2025-03-24 13:52 ` Greg KH
2025-03-24 15:18 ` Miguel Ojeda
2025-03-24 15:27 ` Danilo Krummrich
2025-03-24 15:40 ` Miguel Ojeda
2025-03-17 10:57 Stephen Rothwell
2025-03-17 22:35 ` Miguel Ojeda
2025-03-17 23:35 ` Stephen Rothwell
2025-03-18 11:37 ` Stephen Rothwell
2025-03-18 23:47 ` Miguel Ojeda
2025-03-19 9:06 ` Stephen Rothwell
2025-03-19 9:18 ` Miguel Ojeda
2025-01-10 5:28 Stephen Rothwell
2025-01-10 9:28 ` Alice Ryhl
2025-01-10 9:34 ` Greg Kroah-Hartman
2025-01-10 9:41 ` Alice Ryhl
2025-01-10 10:07 ` Alice Ryhl
2025-01-10 10:08 ` Miguel Ojeda
2025-01-10 10:16 ` Miguel Ojeda
2025-01-10 10:38 ` Miguel Ojeda
2024-12-16 5:25 Stephen Rothwell
2024-12-16 10:31 ` Miguel Ojeda
2024-12-16 10:59 ` Jocelyn Falempe
2024-12-16 16:24 ` Miguel Ojeda
2024-12-16 19:46 ` Jocelyn Falempe
2021-09-28 4:09 Stephen Rothwell
2021-09-28 4:18 ` Gary Guo
2021-09-28 5:52 ` Stephen Rothwell
2021-09-28 23:37 ` Stephen Rothwell
2021-09-29 17:13 ` Masahiro Yamada
2021-09-29 17:25 ` Miguel Ojeda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241111175842.550fc29d@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=ojeda@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox