Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] rust: drm: gem: missing #[inline] on BaseObject::is_imported() --
commit 870fd74aba497ab1671a05a6bf7eca2012bd1ed7 Author: Sami Tolvanen <[email protected]> rust: drm: gem: add an is_imported() accessor This commit adds BaseObject::is_imported() and a corresponding C helper shim to check whether a DRM GEM object is PRIME-imported. > diff --git a/rust/kernel/drm/gem/mod.rs b/rust/kernel/drm/gem/mod.rs > index e01b8311dd895..5da8627275a29 100644 > --- a/rust/kernel/drm/gem/mod.rs > +++ b/rust/kernel/drm/gem/mod.rs > @@ -187,6 +187,13 @@ fn size(&self) -> usize { > unsafe { (*self.as_raw()).size } > } > > + /// Returns whether the object's backing buffer is imported from another > + /// driver. > + fn is_imported(&self) -> bool { > + // SAFETY: `self.as_raw()` is guaranteed to be a pointer to a valid > `struct drm_gem_object`. > + unsafe { bindings::drm_gem_is_imported(self.as_raw()) } > + } [Severity: Low] This isn't a bug, but since BaseObject::is_imported() in rust/kernel/drm/gem/mod.rs is a small abstraction method in the kernel crate that directly forwards to bindings::drm_gem_is_imported(), should it be annotated with #[inline] per the Rust coding guidelines? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/20261026-rust-drm-gem-shmem-imported-sgt-v1-0-36f15ace0...@jannau.net?part=2
