public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/vblank: Add drmm_vblank_init() to indicate managed cleanup
Date: Thu, 28 May 2026 12:19:14 +1000	[thread overview]
Message-ID: <review-patch1-20260527133917.207150-2-tzimmermann@suse.de> (raw)
In-Reply-To: <20260527133917.207150-2-tzimmermann@suse.de>

Patch Review

This patch renames `drm_vblank_init()` to `drmm_vblank_init()` to follow the DRM managed-resource naming convention, adds a `flags` argument, and keeps the old name as a deprecated inline wrapper.

**Observations:**

- The rename is appropriate — `drm_vblank_init()` already uses `drmm_add_action_or_reset()` internally, so the `drmm_` prefix is the correct convention.

- The new `flags` field is added to `struct drm_vblank_crtc` without documentation:
  ```c
  +	unsigned int flags;
   };
  ```
  Given that every other field in this struct has a kerneldoc `/** @field: ... */` comment, adding one here (even brief) would be consistent. Something like `/** @flags: flags for vblank handling (e.g., DRM_VBLANK_FLAG_SIMULATED) */`.

- The internal release callback rename from `drm_vblank_init_release` to `drmm_vblank_init_release` is a nice consistency touch.

- The inline backward-compat wrapper passing `0` for flags is clean:
  ```c
  +static inline int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs)
  +{
  +	return drmm_vblank_init(dev, num_crtcs, 0);
  +}
  ```
  This avoids a tree-wide conversion in one go.

- Minor: the `flags` parameter is not validated in any way (e.g., rejecting unknown bits). This is fine for an internal kernel API, but if flags grow in the future, you might want a `if (flags & ~DRM_VBLANK_FLAG_SIMULATED) return -EINVAL;` check. Not required now.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-28  2:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27 13:32 [PATCH v2 0/9] drm: Limit DRM_IOCTL_WAIT_VBLANK to vblank interrupts Thomas Zimmermann
2026-05-27 13:32 ` [PATCH v2 1/9] drm/vblank: Add drmm_vblank_init() to indicate managed cleanup Thomas Zimmermann
2026-05-28  2:19   ` Claude Code Review Bot [this message]
2026-05-27 13:32 ` [PATCH v2 2/9] drm/vblank: Add DRM_VBLANK_FLAG_SIMULATED Thomas Zimmermann
2026-05-28  2:19   ` Claude review: " Claude Code Review Bot
2026-05-27 13:32 ` [PATCH v2 3/9] drm/amdgpu: vkms: Set DRM_VBLANK_FLAG_SIMULATED Thomas Zimmermann
2026-05-28  2:19   ` Claude review: " Claude Code Review Bot
2026-05-27 13:32 ` [PATCH v2 4/9] drm/bochs: " Thomas Zimmermann
2026-05-28  2:19   ` Claude review: " Claude Code Review Bot
2026-05-27 13:32 ` [PATCH v2 5/9] drm/cirrus: " Thomas Zimmermann
2026-05-28  2:19   ` Claude review: " Claude Code Review Bot
2026-05-27 13:32 ` [PATCH v2 6/9] drm/hypervdrm: " Thomas Zimmermann
2026-05-28  2:19   ` Claude review: " Claude Code Review Bot
2026-05-27 13:32 ` [PATCH v2 7/9] drm/qxl: " Thomas Zimmermann
2026-05-28  2:19   ` Claude review: " Claude Code Review Bot
2026-05-27 13:32 ` [PATCH v2 8/9] drm/virtgpu: " Thomas Zimmermann
2026-05-28  2:19   ` Claude review: " Claude Code Review Bot
2026-05-27 13:32 ` [PATCH v2 9/9] drm/vkms: " Thomas Zimmermann
2026-05-28  2:19   ` Claude review: " Claude Code Review Bot
2026-05-27 16:31 ` [PATCH v2 0/9] drm: Limit DRM_IOCTL_WAIT_VBLANK to vblank interrupts Julian Orth
2026-05-28  2:19 ` Claude review: " Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-05-15 11:55 [PATCH 0/9] " Thomas Zimmermann
2026-05-15 11:55 ` [PATCH 1/9] drm/vblank: Add drmm_vblank_init() to indicate managed cleanup Thomas Zimmermann
2026-05-15 23:20   ` Claude review: " Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-patch1-20260527133917.207150-2-tzimmermann@suse.de \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox