On Tue, May 13, 2025 at 02:07:57PM -0400, Joel Fernandes wrote:
Hello Miguel,
On Fri, May 02, 2025 at 04:02:33PM +0200, Miguel Ojeda wrote:
Starting with Rust 1.87.0 (expected 2025-05-15), `objtool` may report:
rust/core.o: warning: objtool: _R..._4core9panicking9panic_fmt() falls through to next function _R..._4core9panicking18panic_nounwind_fmt() rust/core.o: warning: objtool: _R..._4core9panicking18panic_nounwind_fmt() falls through to next function _R..._4core9panicking5panic()
We are seeing a similar issue with the patch [1]:
RUSTC [M] drivers/gpu/nova-core/nova_core.o drivers/gpu/nova-core/nova_core.o: warning: objtool: <nova_core::vbios::PciAtBiosImage as core::convert::TryFrom<nova_core::vbios::BiosImageBase>>::try_from() falls through to next function <nova_core::vbios::FwSecBiosImage>::fwsec_header()
The code in concern is implementing try_from():
+impl TryFrom<BiosImageBase> for PciAtBiosImage {
- type Error = Error;
- fn try_from(base: BiosImageBase) -> Result<Self> {
I dumped the codegen [2] for this function and at the end of the codegen, there is a call instruction to to the fwsec_header() function.
Any thoughts on how to fix the warning?
Btw, Danilo mentioned to me the latest Rust compiler (1.86?) does not give this warning for that patch.
Mine is on 1.85. So if anyone else other than me is suffering from this warning, do upgrade. :-)
thanks,
- Joel