Re: [RFC 1/7] rust: pci: expose sriov_get_totalvfs() helper
From: Miguel Ojeda
Date: Mon Dec 08 2025 - 20:10:11 EST
On Sun, Dec 7, 2025 at 9:52 AM Dirk Behme <dirk.behme@xxxxxxxxx> wrote:
>
> What's about to do something similar here (and in the 2/7 patch as well)?
In general, using early returns (especially for error and `None`
cases), i.e. keeping the happy path as the unindented/main one,
matches better the usual kernel style.
Whether that is with a simple `if` or `let ... else` etc. it depends
on the case, of course.
Cheers,
Miguel