mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:44:45 +01:00
objtool/rust: add one more noreturn Rust function
Fix the following warning: rust/kernel.o: warning: objtool: _RNvXNtNtCs1ewLyjEZ7Le_6kernel3str9parse_intaNtNtB2_7private12FromStrRadix14from_str_radix() falls through to next function _RNvXNtNtCs1ewLyjEZ7Le_6kernel3str9parse_intaNtNtB2_7private12FromStrRadix16from_u64_negated() The commit51d9ee90ea("rust: str: add radix prefixed integer parsing functions") introduces u64::from_str_radix(), whose implementation contains a panic path for out-of-range radix values. The panic helper is core::num::from_ascii_radix_panic(). Note that radix is derived from strip_radix() here and is always within the valid range, so kernel never panics. Fixes:51d9ee90ea("rust: str: add radix prefixed integer parsing functions") Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Tested-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20251223113538.1016078-1-fujita.tomonori@gmail.com [ Reworded typo. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
f1db653879
commit
c18f35e490
1 changed files with 2 additions and 1 deletions
|
|
@ -197,7 +197,8 @@ static bool is_rust_noreturn(const struct symbol *func)
|
|||
* as well as changes to the source code itself between versions (since
|
||||
* these come from the Rust standard library).
|
||||
*/
|
||||
return str_ends_with(func->name, "_4core5sliceSp15copy_from_slice17len_mismatch_fail") ||
|
||||
return str_ends_with(func->name, "_4core3num22from_ascii_radix_panic") ||
|
||||
str_ends_with(func->name, "_4core5sliceSp15copy_from_slice17len_mismatch_fail") ||
|
||||
str_ends_with(func->name, "_4core6option13expect_failed") ||
|
||||
str_ends_with(func->name, "_4core6option13unwrap_failed") ||
|
||||
str_ends_with(func->name, "_4core6result13unwrap_failed") ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue