Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] nova-core: mm: obsolete comment claims Test 4 constructs a fresh BarUser
--

commit b705dbdc6dba4759072fbccc510dc7a0935032c8
Author: Danilo Krummrich <[email protected]>

gpu: nova-core: mm: get rid of Arc<BarUser> in BarUserAccess

There is no need for a reference count here. BarUserAccess can just
borrow from BarUser.

> diff --git a/drivers/gpu/nova-core/mm/bar_user.rs 
> b/drivers/gpu/nova-core/mm/bar_user.rs
> index 6c8fa06d9f4bb..855244f069831 100644
> --- a/drivers/gpu/nova-core/mm/bar_user.rs
> +++ b/drivers/gpu/nova-core/mm/bar_user.rs
[ ... ]
> @@ -390,10 +389,6 @@ pub(crate) fn run_self_test(
>      drop(vmm);
>  
>      // Test 4: Exercise `BarUser::map()` end-to-end.
> -    let bar_user = Arc::pin_init(
> -        BarUser::new(pdb_addr, chipset, SZ_64K.into_safe_cast(), bar1),
> -        GFP_KERNEL,
> -    )?;
>      let access = bar_user.map(mm, &[test_pfn], true)?;
>  
>      // Write pattern via PRAMIN, read via BarUserAccess.

[Severity: Low]
Should the comment just above drop(vmm) in run_self_test() in
drivers/gpu/nova-core/mm/bar_user.rs be updated?

It currently says: "Release Tests 1-3's Vmm before Test 4 constructs a fresh
BarUser on the same PDB."

Since this patch removes the construction of a fresh BarUser for Test 4,
that part of the comment is now obsolete.

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

Reply via email to