public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/vram: remove DRM_VRAM_MM_FILE_OPERATIONS from docs
@ 2026-04-08 19:31 Thadeu Lima de Souza Cascardo
  2026-04-09  7:01 ` Thomas Zimmermann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2026-04-08 19:31 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter
  Cc: dri-devel, linux-kernel, kernel-dev,
	Thadeu Lima de Souza Cascardo

Commit 02f64b2d8605 ("drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS") dropped
DRM_VRAM_MM_FILE_OPERATIONS in preference for using DEFINE_DRM_GEM_OPS.

However, it was not dropped from the kernel docs.

Use DEFINE_DRM_GEM_OPS in the illustration on how to define a
struct file_operations for such a DRM driver and remove any reference
to DRM_VRAM_MM_FILE_OPERATIONS.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
---
 drivers/gpu/drm/drm_gem_vram_helper.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
index d7fcced75e797ce1b86313612a577775c9c26487..bca802ccddee792b8a8f643ecb02a41915f7ba18 100644
--- a/drivers/gpu/drm/drm_gem_vram_helper.c
+++ b/drivers/gpu/drm/drm_gem_vram_helper.c
@@ -49,15 +49,12 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
  * To initialize the VRAM helper library call drmm_vram_helper_init().
  * The function allocates and initializes an instance of &struct drm_vram_mm
  * in &struct drm_device.vram_mm . Use &DRM_GEM_VRAM_DRIVER to initialize
- * &struct drm_driver and  &DRM_VRAM_MM_FILE_OPERATIONS to initialize
+ * &struct drm_driver and &DEFINE_DRM_GEM_FOPS to define
  * &struct file_operations; as illustrated below.
  *
  * .. code-block:: c
  *
- *	struct file_operations fops ={
- *		.owner = THIS_MODULE,
- *		DRM_VRAM_MM_FILE_OPERATION
- *	};
+ *	DEFINE_DRM_GEM_FOPS(fops);
  *	struct drm_driver drv = {
  *		.driver_feature = DRM_ ... ,
  *		.fops = &fops,

---
base-commit: 408df6213f56f467675dc0ecf156a8bd1984555e
change-id: 20260408-drm_gem_vram_helper_docs-bc7f30f9c561

Best regards,
-- 
Thadeu Lima de Souza Cascardo <cascardo@igalia.com>


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

* Re: [PATCH] drm/vram: remove DRM_VRAM_MM_FILE_OPERATIONS from docs
  2026-04-08 19:31 [PATCH] drm/vram: remove DRM_VRAM_MM_FILE_OPERATIONS from docs Thadeu Lima de Souza Cascardo
@ 2026-04-09  7:01 ` Thomas Zimmermann
  2026-04-12  2:11 ` Claude review: " Claude Code Review Bot
  2026-04-12  2:11 ` Claude Code Review Bot
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Zimmermann @ 2026-04-09  7:01 UTC (permalink / raw)
  To: Thadeu Lima de Souza Cascardo, Maarten Lankhorst, Maxime Ripard,
	David Airlie, Simona Vetter
  Cc: dri-devel, linux-kernel, kernel-dev



Am 08.04.26 um 21:31 schrieb Thadeu Lima de Souza Cascardo:
> Commit 02f64b2d8605 ("drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS") dropped
> DRM_VRAM_MM_FILE_OPERATIONS in preference for using DEFINE_DRM_GEM_OPS.
>
> However, it was not dropped from the kernel docs.
>
> Use DEFINE_DRM_GEM_OPS in the illustration on how to define a
> struct file_operations for such a DRM driver and remove any reference
> to DRM_VRAM_MM_FILE_OPERATIONS.
>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>

Thanks for the patch.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

Fixes: 02f64b2d8605 ("drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS")



> ---
>   drivers/gpu/drm/drm_gem_vram_helper.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> index d7fcced75e797ce1b86313612a577775c9c26487..bca802ccddee792b8a8f643ecb02a41915f7ba18 100644
> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> @@ -49,15 +49,12 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
>    * To initialize the VRAM helper library call drmm_vram_helper_init().
>    * The function allocates and initializes an instance of &struct drm_vram_mm
>    * in &struct drm_device.vram_mm . Use &DRM_GEM_VRAM_DRIVER to initialize
> - * &struct drm_driver and  &DRM_VRAM_MM_FILE_OPERATIONS to initialize
> + * &struct drm_driver and &DEFINE_DRM_GEM_FOPS to define
>    * &struct file_operations; as illustrated below.
>    *
>    * .. code-block:: c
>    *
> - *	struct file_operations fops ={
> - *		.owner = THIS_MODULE,
> - *		DRM_VRAM_MM_FILE_OPERATION
> - *	};
> + *	DEFINE_DRM_GEM_FOPS(fops);
>    *	struct drm_driver drv = {
>    *		.driver_feature = DRM_ ... ,
>    *		.fops = &fops,
>
> ---
> base-commit: 408df6213f56f467675dc0ecf156a8bd1984555e
> change-id: 20260408-drm_gem_vram_helper_docs-bc7f30f9c561
>
> Best regards,

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)



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

* Claude review: drm/vram: remove DRM_VRAM_MM_FILE_OPERATIONS from docs
  2026-04-08 19:31 [PATCH] drm/vram: remove DRM_VRAM_MM_FILE_OPERATIONS from docs Thadeu Lima de Souza Cascardo
  2026-04-09  7:01 ` Thomas Zimmermann
@ 2026-04-12  2:11 ` Claude Code Review Bot
  2026-04-12  2:11 ` Claude Code Review Bot
  2 siblings, 0 replies; 4+ messages in thread
From: Claude Code Review Bot @ 2026-04-12  2:11 UTC (permalink / raw)
  To: dri-devel-reviews

Overall Series Review

Subject: drm/vram: remove DRM_VRAM_MM_FILE_OPERATIONS from docs
Author: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Patches: 2
Reviewed: 2026-04-12T12:11:00.757388

---

This is a single-patch documentation fix that is straightforward and correct. It removes a stale reference to the deleted `DRM_VRAM_MM_FILE_OPERATIONS` macro from the kernel-doc comments in `drm_gem_vram_helper.c` and replaces it with the current `DEFINE_DRM_GEM_FOPS` macro usage.

The patch has already been applied to drm-next (which is why it doesn't apply cleanly to the tree). The fix is clearly correct — the old macro was removed by commit `02f64b2d8605` but the documentation was not updated at that time.

**Verdict: Clean, correct documentation fix. Good to merge.**

---
Generated by Claude Code Patch Reviewer

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

* Claude review: drm/vram: remove DRM_VRAM_MM_FILE_OPERATIONS from docs
  2026-04-08 19:31 [PATCH] drm/vram: remove DRM_VRAM_MM_FILE_OPERATIONS from docs Thadeu Lima de Souza Cascardo
  2026-04-09  7:01 ` Thomas Zimmermann
  2026-04-12  2:11 ` Claude review: " Claude Code Review Bot
@ 2026-04-12  2:11 ` Claude Code Review Bot
  2 siblings, 0 replies; 4+ messages in thread
From: Claude Code Review Bot @ 2026-04-12  2:11 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**Status: Looks good**

The patch makes three improvements in the kernel-doc comment block:

1. **Prose text update** (line 52 context): Changes `&DRM_VRAM_MM_FILE_OPERATIONS to initialize` to `&DEFINE_DRM_GEM_FOPS to define`. The verb change from "initialize" to "define" is accurate — `DEFINE_DRM_GEM_FOPS` *defines* a `struct file_operations` (it's a declaration macro), whereas the old `DRM_VRAM_MM_FILE_OPERATIONS` was a field-initializer macro used *inside* a struct definition. Also fixes a double-space typo (`and  &DRM_VRAM_MM_FILE_OPERATIONS` → `and &DEFINE_DRM_GEM_FOPS`).

2. **Code example update**: Replaces the manual struct definition:
   ```c
   struct file_operations fops ={
       .owner = THIS_MODULE,
       DRM_VRAM_MM_FILE_OPERATION
   };
   ```
   with the modern one-liner:
   ```c
   DEFINE_DRM_GEM_FOPS(fops);
   ```
   This matches how real drivers use the macro (confirmed by the definition in `include/drm/drm_gem.h:492`).

3. **Bonus fix**: The old code example had a pre-existing typo — `DRM_VRAM_MM_FILE_OPERATION` (missing trailing `S`). This is now moot since the entire block is replaced.

**No issues found.** The commit message is clear, references the originating commit, and the change is minimal and well-scoped.

Reviewed-by tag recommendation: This patch is ready to apply as-is.

---
Generated by Claude Code Patch Reviewer

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

end of thread, other threads:[~2026-04-12  2:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-08 19:31 [PATCH] drm/vram: remove DRM_VRAM_MM_FILE_OPERATIONS from docs Thadeu Lima de Souza Cascardo
2026-04-09  7:01 ` Thomas Zimmermann
2026-04-12  2:11 ` Claude review: " Claude Code Review Bot
2026-04-12  2:11 ` 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