public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH V2 0/1] Rust DRM build fix
@ 2026-04-26  9:47 Mukesh Kumar Chaurasiya (IBM)
  2026-04-26  9:47 ` [PATCH V2 1/1] rust/drm: import ARef from sync crate Mukesh Kumar Chaurasiya (IBM)
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mukesh Kumar Chaurasiya (IBM) @ 2026-04-26  9:47 UTC (permalink / raw)
  To: dakr, aliceryhl, airlied, simona, ojeda, boqun, gary, bjorn3_gh,
	lossin, a.hindborg, tmgross, daniel.almeida, lina+kernel, lyude,
	j, mkchauras, dri-devel, rust-for-linux, linux-kernel

rust drm gem shmem doesn't builds due to an import error of ARef from
types instead of sync.

Changelog:

V1 -> V2:
- Removed the 2nd patch as it was by design
- Removed unnecessary braces around the Opaque mod
- Minor change in commit message 
V1: https://lore.kernel.org/all/20260426082234.2026908-1-mkchauras@gmail.com/

Mukesh Kumar Chaurasiya (IBM) (1):
  rust/drm: import ARef from sync crate

 rust/kernel/drm/gem/shmem.rs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH V2 1/1] rust/drm: import ARef from sync crate
  2026-04-26  9:47 [PATCH V2 0/1] Rust DRM build fix Mukesh Kumar Chaurasiya (IBM)
@ 2026-04-26  9:47 ` Mukesh Kumar Chaurasiya (IBM)
  2026-04-28  5:19   ` Claude review: " Claude Code Review Bot
  2026-04-27  0:17 ` [PATCH V2 0/1] Rust DRM build fix Danilo Krummrich
  2026-04-28  5:19 ` Claude review: " Claude Code Review Bot
  2 siblings, 1 reply; 6+ messages in thread
From: Mukesh Kumar Chaurasiya (IBM) @ 2026-04-26  9:47 UTC (permalink / raw)
  To: dakr, aliceryhl, airlied, simona, ojeda, boqun, gary, bjorn3_gh,
	lossin, a.hindborg, tmgross, daniel.almeida, lina+kernel, lyude,
	j, mkchauras, dri-devel, rust-for-linux, linux-kernel

ARef is defined in sync and is getting used from types causing the
build to fail.

Fix this by using ARef from sync module.

Signed-off-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
---
 rust/kernel/drm/gem/shmem.rs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/rust/kernel/drm/gem/shmem.rs b/rust/kernel/drm/gem/shmem.rs
index d025fb035195..e1b648920d2f 100644
--- a/rust/kernel/drm/gem/shmem.rs
+++ b/rust/kernel/drm/gem/shmem.rs
@@ -19,10 +19,8 @@
     },
     error::to_result,
     prelude::*,
-    types::{
-        ARef,
-        Opaque, //
-    }, //
+    sync::aref::ARef,
+    types::Opaque, //
 };
 use core::{
     ops::{
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH V2 0/1] Rust DRM build fix
  2026-04-26  9:47 [PATCH V2 0/1] Rust DRM build fix Mukesh Kumar Chaurasiya (IBM)
  2026-04-26  9:47 ` [PATCH V2 1/1] rust/drm: import ARef from sync crate Mukesh Kumar Chaurasiya (IBM)
@ 2026-04-27  0:17 ` Danilo Krummrich
  2026-04-28  5:19 ` Claude review: " Claude Code Review Bot
  2 siblings, 0 replies; 6+ messages in thread
From: Danilo Krummrich @ 2026-04-27  0:17 UTC (permalink / raw)
  To: Mukesh Kumar Chaurasiya (IBM)
  Cc: dakr, aliceryhl, airlied, simona, ojeda, boqun, gary, bjorn3_gh,
	lossin, a.hindborg, tmgross, daniel.almeida, lina+kernel, lyude,
	j, dri-devel, rust-for-linux, linux-kernel

On Sun, 26 Apr 2026 15:17:24 +0530, Mukesh Kumar Chaurasiya (IBM) wrote:
> [PATCH V2 0/1] Rust DRM build fix

Applied, thanks!

  Branch: drm-rust-next
  Tree:   https://gitlab.freedesktop.org/drm/rust/kernel.git

[1/1] rust/drm: import ARef from sync crate
      commit: 5f69165b7e42

      [ Add missing Fixes: tag. - Danilo ]

The patch will appear in the next linux-next integration (typically within 24
hours on weekdays).

The patch is queued up for the upcoming merge window for the next major kernel
release.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Claude review: Rust DRM build fix
  2026-04-26  9:47 [PATCH V2 0/1] Rust DRM build fix Mukesh Kumar Chaurasiya (IBM)
  2026-04-26  9:47 ` [PATCH V2 1/1] rust/drm: import ARef from sync crate Mukesh Kumar Chaurasiya (IBM)
  2026-04-27  0:17 ` [PATCH V2 0/1] Rust DRM build fix Danilo Krummrich
@ 2026-04-28  5:19 ` Claude Code Review Bot
  2 siblings, 0 replies; 6+ messages in thread
From: Claude Code Review Bot @ 2026-04-28  5:19 UTC (permalink / raw)
  To: dri-devel-reviews

Overall Series Review

Subject: Rust DRM build fix
Author: "Mukesh Kumar Chaurasiya (IBM)" <mkchauras@gmail.com>
Patches: 3
Reviewed: 2026-04-28T15:19:57.516627

---

This is a simple single-patch build fix for the Rust DRM GEM shmem helper. The `ARef` type was moved from `kernel::types` to `kernel::sync::aref` (as part of broader Rust kernel reorganization), but the import in `shmem.rs` was not updated, causing a compile failure. The fix is correct and consistent with how other files in the same subsystem already import `ARef`.

**Verdict: The patch looks correct and ready to apply.** One minor nit on style below.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Claude review: rust/drm: import ARef from sync crate
  2026-04-26  9:47 ` [PATCH V2 1/1] rust/drm: import ARef from sync crate Mukesh Kumar Chaurasiya (IBM)
@ 2026-04-28  5:19   ` Claude Code Review Bot
  0 siblings, 0 replies; 6+ messages in thread
From: Claude Code Review Bot @ 2026-04-28  5:19 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**Correctness: Good.** On drm-next, `ARef` is defined in `rust/kernel/sync/aref.rs` and is no longer present in or re-exported from `rust/kernel/types.rs`. The current code:

```rust
types::{
    ARef,
    Opaque, //
}, //
```

will indeed fail to compile. The fix changes it to:

```rust
sync::aref::ARef,
types::Opaque, //
```

This matches the convention used elsewhere in the same DRM subsystem — `rust/kernel/drm/driver.rs:14` already imports via `sync::aref::ARef`.

**Minor nit:** The trailing `//` comment on the `types::Opaque` line is a `rustfmt` artifact to force one-import-per-line formatting. That's fine and consistent with the surrounding code style (the existing code had it too). No issue here, just noting it's intentional.

**Commit message:** The commit message is adequate but could be slightly more precise. It says "ARef is defined in sync and is getting used from types causing the build to fail" — it would be clearer to say "ARef was moved from `kernel::types` to `kernel::sync::aref`" to explain *why* the import broke. This is a very minor suggestion and not a blocker.

**No functional concerns.** The change is purely an import path fix with no behavioral impact.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Claude review: rust/drm: import ARef from sync crate
  2026-04-26  8:22 ` [PATCH V1 1/2] rust/drm: import ARef from sync crate Mukesh Kumar Chaurasiya (IBM)
@ 2026-04-28  5:21   ` Claude Code Review Bot
  0 siblings, 0 replies; 6+ messages in thread
From: Claude Code Review Bot @ 2026-04-28  5:21 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**Verdict: Correct fix, minor style nit.**

The fix is valid. In the current tree, `shmem.rs` imports `ARef` from `crate::types`, but `ARef` is defined in `rust/kernel/sync/aref.rs` (line 68: `pub struct ARef<T: AlwaysRefCounted>`), and no re-export exists in `types.rs`. This is a real build breakage.

The change:
```rust
-    types::{
-        ARef,
-        Opaque, //
-    }, //
+    sync::aref::ARef,
+    types::{
+        Opaque, //
+    }, //
```

This correctly moves the import. One minor observation: the trailing `//` comments on the closing braces (lines like `}, //`) look like they're artifacts of `rustfmt` line-breaking workarounds from the existing code, not something the patch introduces, so that's fine.

**No blocking issues.**

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-28  5:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-26  9:47 [PATCH V2 0/1] Rust DRM build fix Mukesh Kumar Chaurasiya (IBM)
2026-04-26  9:47 ` [PATCH V2 1/1] rust/drm: import ARef from sync crate Mukesh Kumar Chaurasiya (IBM)
2026-04-28  5:19   ` Claude review: " Claude Code Review Bot
2026-04-27  0:17 ` [PATCH V2 0/1] Rust DRM build fix Danilo Krummrich
2026-04-28  5:19 ` Claude review: " Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-04-26  8:22 [PATCH V1 0/2] " Mukesh Kumar Chaurasiya (IBM)
2026-04-26  8:22 ` [PATCH V1 1/2] rust/drm: import ARef from sync crate Mukesh Kumar Chaurasiya (IBM)
2026-04-28  5:21   ` Claude review: " Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox