Re: [PATCH v3 1/7] rust: firmware: add request_into_buf()

Timur Tabi <[email protected]>
Newsgroups dev.linux.lists.nova-gpu,dev.linux.lists.driver-core,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
On Mon, 2026-07-06 at 12:50 +0200, Danilo Krummrich wrote:
> On Mon Jul 6, 2026 at 8:30 AM CEST, Alexandre Courbot wrote:
> > Sashiko is correct to point out that this doesn't return the number of
> > bytes actually written into `buf`. We might not use that information in
> > nova-core, but this is a kernel-wide API.
> 
> Returning the size only doesn't carry a lot of value, please see [1].
> 
> > Returning a `Result<&[u8]>` would take care of this and cover the
> > general use-case nicely.
> 
> I'm fine with either this or just Result, as we don't have a user for the
> former.
> 
> [1] https://lore.kernel.org/nova-gpu/[email protected]/

Guys, please come to a consensus.  I had it return a size originally, but then Danilo said don't
bother, and now Alex says I should return a size.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.