Re: [PATCH v1] objtool/rust: add one more `noreturn` Rust function
From: Alice Ryhl
Date: Sun Dec 28 2025 - 05:31:43 EST
On Tue, Dec 23, 2025 at 08:35:38PM +0900, FUJITA Tomonori wrote:
> Fix the follwoing warning:
>
> rust/kernel.o: warning: objtool: _RNvXNtNtCs1ewLyjEZ7Le_6kernel3str9parse_intaNtNtB2_7private12FromStrRadix14from_str_radix()
> falls through to next function _RNvXNtNtCs1ewLyjEZ7Le_6kernel3str9parse_intaNtNtB2_7private12FromStrRadix16from_u64_negated()
>
> The commit 51d9ee90ea90 ("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: 51d9ee90ea90 ("rust: str: add radix prefixed integer parsing functions")
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxx>
Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
Tested-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>