Re: [PATCH 3/4] rust: xarray: Update StoreError comments for alloc()

From: Gary Guo

Date: Mon Apr 20 2026 - 13:20:49 EST


On Fri Apr 17, 2026 at 2:05 AM BST, Alvin Sun wrote:
> Update StoreError documentation comments to mention alloc() usage since
> this error type will be used by the upcoming alloc() helper.
>
> Signed-off-by: Alvin Sun <alvin.sun@xxxxxxxxx>
> ---
> rust/kernel/xarray.rs | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/rust/kernel/xarray.rs b/rust/kernel/xarray.rs
> index 1b882cd2f58bf..235fda0e394ba 100644
> --- a/rust/kernel/xarray.rs
> +++ b/rust/kernel/xarray.rs
> @@ -161,13 +161,13 @@ fn drop(&mut self) {
> }
> }
>
> -/// The error returned by [`store`](Guard::store).
> +/// The error returned by [`Guard::store`] and [`Guard::alloc`].
> ///
> -/// Contains the underlying error and the value that was not stored.
> +/// Contains the underlying error and the value that was not stored or allocated.
> pub struct StoreError<T> {
> /// The error that occurred.
> pub error: Error,
> - /// The value that was not stored.
> + /// The value that was not stored or allocated.
> pub value: T,
> }
>

This should be a review comment to be folded into that patch series.

Best,
Gary