public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the rust tree
@ 2025-01-10  5:28 Stephen Rothwell
  2025-01-10  9:28 ` Alice Ryhl
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2025-01-10  5:28 UTC (permalink / raw)
  To: Miguel Ojeda, Greg KH
  Cc: Alice Ryhl, Greg Kroah-Hartman, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2109 bytes --]

Hi all,

After merging the rust tree, today's linux-next build (x86_64
allmodconfig) failed like this:

error[E0423]: expected function, found macro `kernel::build_error`
   --> rust/kernel/miscdevice.rs:159:9
    |
159 |         kernel::build_error(VTABLE_DEFAULT_ERROR)
    |         ^^^^^^^^^^^^^^^^^^^ not a function
    |
help: use `!` to invoke the macro
    |
159 |         kernel::build_error!(VTABLE_DEFAULT_ERROR)
    |                            +
help: consider importing one of these functions instead
    |
11  + use crate::build_assert::build_error;
    |
11  + use build_error::build_error;
    |
help: if you import `build_error`, refer to it directly
    |
159 -         kernel::build_error(VTABLE_DEFAULT_ERROR)
159 +         build_error(VTABLE_DEFAULT_ERROR)
    |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0423`.

Caused by commit

  614724e780f5 ("rust: kernel: move `build_error` hidden function to prevent mistakes")

interacting with commit

  5bcc8bfe841b ("rust: miscdevice: add fops->show_fdinfo() hook")

from the driver-core tree.

I have added the following merge resolution patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 10 Jan 2025 16:02:19 +1100
Subject: [PATCH] fix up for "rust: kernel: move `build_error` hidden function
 to prevent mistakes"

interacting with commit

  5bcc8bfe841b ("rust: miscdevice: add fops->show_fdinfo() hook")

from the driver-core tree.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 rust/kernel/miscdevice.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/miscdevice.rs b/rust/kernel/miscdevice.rs
index 9685e50b100d..3ba018651bc0 100644
--- a/rust/kernel/miscdevice.rs
+++ b/rust/kernel/miscdevice.rs
@@ -156,7 +156,7 @@ fn show_fdinfo(
         _m: &SeqFile,
         _file: &File,
     ) {
-        kernel::build_error(VTABLE_DEFAULT_ERROR)
+        build_error!(VTABLE_DEFAULT_ERROR)
     }
 }
 
-- 
2.45.2

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2025-01-10 12:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-10  5:28 linux-next: build failure after merge of the rust tree 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:14         ` [PATCH] miscdevice: rust: use build_error! macro instead of function Alice Ryhl
2025-01-10 10:38           ` Miguel Ojeda
2025-01-10 12:23             ` Greg KH
2025-01-10 12:32               ` Alice Ryhl
2025-01-10 10:08       ` linux-next: build failure after merge of the rust tree Miguel Ojeda
2025-01-10 10:16     ` Miguel Ojeda
2025-01-10 10:38       ` Miguel Ojeda

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