diff options
author | Alice Ryhl <aliceryhl@google.com> | 2025-03-04 13:25:13 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2025-03-05 01:07:49 +0300 |
commit | ab938b59e9de924de20ba4a8f768649573421204 (patch) | |
tree | d0ae46a90c0077d13d325f5f7517bf0bdf036fa9 /scripts/generate_rust_analyzer.py | |
parent | 0a01beac927a1920487e40a2f9577e871261d89b (diff) | |
download | linux-ab938b59e9de924de20ba4a8f768649573421204.tar.xz |
cred,rust: mark Credential methods inline
When you build the kernel using the llvm-19.1.4-rust-1.83.0-x86_64
toolchain provided by kernel.org with ARCH=arm64, the following symbols
are generated:
$ nm out-linux/vmlinux | grep ' _R'.*Credential | rustfilt
... T <kernel::cred::Credential>::get_secid
... T <kernel::cred::Credential as
kernel::types::AlwaysRefCounted>::dec_ref
... T <kernel::cred::Credential as
kernel::types::AlwaysRefCounted>::inc_ref
However, these Rust symbols are trivial wrappers around the functions
security_cred_getsecid, get_cred, and put_cred respectively. It doesn't
make sense to go through a trivial wrapper for these functions, so mark
them inline. Also mark other trivial methods inline to prevent similar
cases in the future.
After applying this patch, the above command will produce no output.
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
[PM: subject tweak, description line trims]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions