Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] rust: dma_fence: missing closing brace in DriverFence doctest
--

commit 71f83d6d3879ba695c584c9c6ba8d757e416fe9e
Author: Philipp Stanner <[email protected]>

rust: DmaFence: Tell results in signaling callbacks

This commit updates the FenceCallback::on_signal() trait method in
rust/kernel/dma_buf/dma_fence.rs to pass the fence's signaling status as a
Result parameter to callback implementations.

> diff --git a/rust/kernel/dma_buf/dma_fence.rs 
> b/rust/kernel/dma_buf/dma_fence.rs
> index 9cef604f17ea9..8c5d2a415504e 100644
> --- a/rust/kernel/dma_buf/dma_fence.rs
> +++ b/rust/kernel/dma_buf/dma_fence.rs

[ ... ]

> @@ -671,8 +681,12 @@ struct DriverFenceData<'a, T: Send + Sync + 
> FenceContextOps> {
>  /// struct CallbackData { }
>  ///
>  /// impl FenceCallback for CallbackData {
> -///     fn on_signal(&mut self) {
> -///         pr_info!("DmaFence callback executed.\n");
> +///     fn on_signal(&mut self, status: Result) {
> +///         if status.is_ok() {
> +///             pr_info!("DmaFence callback executed.\n");
> +///         else {
> +///             pr_err!("DmaFence callback executed, but fence has an 
> error.\n");
> +///         }
>  ///     }
>  /// }

[Severity: Low]
In the DriverFence doc comment example in rust/kernel/dma_buf/dma_fence.rs,
is a closing brace missing before else in CallbackData::on_signal()? When
both CONFIG_DMA_SHARED_BUFFER and CONFIG_RUST_KERNEL_DOCTESTS are enabled,
building the kernel doctests fails with a syntax error because the if
status.is_ok() block is not closed.

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

Reply via email to