Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] rust: missing `#[inline]` on `Deref::deref` in abstraction crate
--

commit 5ced5828ef2b966abecf7589e50ceba496fd2ff8
Author: Philipp Stanner <[email protected]>

rust: DmaFence: Implement Deref for FenceContext

This commit implements the Deref trait for FenceContext. It allows users
to easily access the data carried by a FenceContext by dereferencing it.

> diff --git a/rust/kernel/dma_buf/dma_fence.rs 
> b/rust/kernel/dma_buf/dma_fence.rs
> index eef2b9e93f356..0028124e6aa64 100644
> --- a/rust/kernel/dma_buf/dma_fence.rs
> +++ b/rust/kernel/dma_buf/dma_fence.rs
> @@ -86,6 +86,14 @@ pub struct FenceContext<T: FenceContextOps + Send + Sync> {
>      data: T,
>  }
>  
> +impl<T: Send + Sync + FenceContextOps> Deref for FenceContext<T> {
> +    type Target = T;
> +
> +    fn deref(&self) -> &Self::Target {

[Severity: Low]
This isn't a bug, but according to the Rust subsystem guidelines, small
abstraction functions in the kernel crate should be annotated with #[inline].
Since this deref implementation is a trivial getter, should #[inline] be
added here to allow optimal inlining across crate boundaries?

> +        &self.data
> +    }
> +}
> +

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=2

Reply via email to