summaryrefslogtreecommitdiffstats
path: root/rust/kernel/generated_arch_static_branch_asm.rs.S
diff options
context:
space:
mode:
authorMiguel Ojeda <ojeda@kernel.org>2024-11-20 18:59:16 +0100
committerSteven Rostedt (Google) <rostedt@goodmis.org>2024-11-20 13:32:42 -0500
commit8af7a50167833b6b22e30c008bbf95ab3ff1a5fb (patch)
tree1460b9069a338a4046d2b8e6954a4fbc0e2c84a6 /rust/kernel/generated_arch_static_branch_asm.rs.S
parent7643155dce1428fd63e47d7afe8bf3dbca20cc25 (diff)
downloadlinux-stable-8af7a50167833b6b22e30c008bbf95ab3ff1a5fb.tar.gz
linux-stable-8af7a50167833b6b22e30c008bbf95ab3ff1a5fb.tar.bz2
linux-stable-8af7a50167833b6b22e30c008bbf95ab3ff1a5fb.zip
rust: jump_label: skip formatting generated file
After a source tree build of the kernel, and having used the `RSCPP` rule, running `rustfmt` fails with: error: macros that expand to items must be delimited with braces or followed by a semicolon --> rust/kernel/arch_static_branch_asm.rs:1:27 | 1 | ...ls!("1: jmp " ... ".popsection \n\t") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | help: change the delimiters to curly braces | 1 | ::kernel::concat_literals!{"1: jmp " ... ".popsection \n\t"} | ~ ~ help: add a semicolon | 1 | ::kernel::concat_literals!("1: jmp " ... ".popsection \n\t"); | + This file is not meant to be formatted nor works on its own since it is meant to be textually included. Thus skip formatting it by prefixing its name with `generated_`. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Alex Gaynor <alex.gaynor@gmail.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Gary Guo <gary@garyguo.net> Cc: Björn Roy Baron <bjorn3_gh@protonmail.com> Cc: Benno Lossin <benno.lossin@proton.me> Cc: Andreas Hindborg <a.hindborg@kernel.org> Cc: Alice Ryhl <aliceryhl@google.com> Cc: Trevor Gross <tmgross@umich.edu> Link: https://lore.kernel.org/20241120175916.58860-1-ojeda@kernel.org Fixes: 169484ab6677 ("rust: add arch_static_branch") Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'rust/kernel/generated_arch_static_branch_asm.rs.S')
-rw-r--r--rust/kernel/generated_arch_static_branch_asm.rs.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/rust/kernel/generated_arch_static_branch_asm.rs.S b/rust/kernel/generated_arch_static_branch_asm.rs.S
new file mode 100644
index 000000000000..2afb638708db
--- /dev/null
+++ b/rust/kernel/generated_arch_static_branch_asm.rs.S
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#include <linux/jump_label.h>
+
+// Cut here.
+
+::kernel::concat_literals!(ARCH_STATIC_BRANCH_ASM("{symb} + {off} + {branch}", "{l_yes}"))