[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72mkPMwb=3P_-fjObUC8NmY_6pzK5cn41RRwa2zJCazuPA@mail.gmail.com>
Date: Tue, 9 Dec 2025 02:09:38 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Dirk Behme <dirk.behme@...il.com>
Cc: Zhi Wang <zhiw@...dia.com>, rust-for-linux@...r.kernel.org,
linux-pci@...r.kernel.org, nouveau@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, airlied@...il.com, dakr@...nel.org,
aliceryhl@...gle.com, bhelgaas@...gle.com, kwilczynski@...nel.org,
ojeda@...nel.org, alex.gaynor@...il.com, boqun.feng@...il.com,
gary@...yguo.net, bjorn3_gh@...tonmail.com, lossin@...nel.org,
a.hindborg@...nel.org, tmgross@...ch.edu, markus.probst@...teo.de,
helgaas@...nel.org, cjia@...dia.com, alex@...zbot.org, smitra@...dia.com,
ankita@...dia.com, aniketa@...dia.com, kwankhede@...dia.com,
targupta@...dia.com, acourbot@...dia.com, joelagnelf@...dia.com,
jhubbard@...dia.com, zhiwang@...nel.org
Subject: Re: [RFC 1/7] rust: pci: expose sriov_get_totalvfs() helper
On Sun, Dec 7, 2025 at 9:52 AM Dirk Behme <dirk.behme@...il.com> 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
Powered by blists - more mailing lists