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/bridge: Implement generic USB Type-C DP HPD bridge
Date: Mon, 25 May 2026 21:00:52 +1000	[thread overview]
Message-ID: <review-patch1-20260521032854.103-2-kernel@airkyi.com> (raw)
In-Reply-To: <20260521032854.103-2-kernel@airkyi.com>

Patch Review

This patch adds a new module that monitors the Type-C bus for altmode devices with DP SVID and automatically creates an HPD bridge for them.

**Issue 1: No error handling for bridge registration failure**
```c
if (is_typec_port_altmode(&alt->dev) && alt->svid == USB_TYPEC_DP_SID)
    drm_dp_hpd_bridge_register(alt->dev.parent->parent,
                               to_of_node(alt->dev.parent->fwnode));
```
`drm_dp_hpd_bridge_register()` returns a `struct device *` which can be an ERR_PTR. The return value is silently ignored. While there may not be much that can be done from a bus notifier, at least a `dev_warn()` would help debugging.

**Issue 2: Fragile device hierarchy assumption**
The comment documents the parent traversal (`alt->dev.parent->parent` = USB-C controller device), but this is a fragile assumption about the device hierarchy. If the hierarchy ever changes, this will silently break. Consider whether there's a more robust API to get the controller device.

**Issue 3: Module exit doesn't clean up bridges**
`drm_aux_hpd_typec_dp_bridge_module_exit()` only unregisters the notifier but doesn't clean up any bridges that were registered via `drm_dp_hpd_bridge_register()`. Those are `devm`-managed on the controller device, so they'll survive module unload. This may be intentional, but it means loading/unloading this module repeatedly could have unexpected interactions.

**Minor: Missing MODULE_AUTHOR**

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-25 11:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21  3:28 [PATCH 0/5] drm/bridge: Implement generic USB Type-C DP HPD bridge Chaoyi Chen
2026-05-21  3:28 ` [PATCH 1/5] " Chaoyi Chen
2026-05-25 11:00   ` Claude Code Review Bot [this message]
2026-05-21  3:28 ` [PATCH 2/5] drm/bridge: aux: Add drm_aux_bridge_register_from_node() Chaoyi Chen
2026-05-25 11:00   ` Claude review: " Claude Code Review Bot
2026-05-21  3:28 ` [PATCH 3/5] phy: rockchip: phy-rockchip-typec: Add DRM AUX bridge Chaoyi Chen
2026-05-21  9:06   ` Heiko Stuebner
2026-05-25 11:00   ` Claude review: " Claude Code Review Bot
2026-05-21  3:28 ` [PATCH 4/5] drm/rockchip: cdn-dp: Support handle lane info without extcon Chaoyi Chen
2026-05-25 11:00   ` Claude review: " Claude Code Review Bot
2026-05-21  3:28 ` [PATCH 5/5] drm/rockchip: cdn-dp: Add multiple bridges to support PHY port selection Chaoyi Chen
2026-05-25 11:00   ` Claude review: " Claude Code Review Bot
2026-05-25 11:00 ` Claude review: drm/bridge: Implement generic USB Type-C DP HPD bridge Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-04  9:41 [PATCH v15 0/9] Add Type-C DP support for RK3399 EVB IND board Chaoyi Chen
2026-03-04  9:41 ` [PATCH v15 1/9] drm/bridge: Implement generic USB Type-C DP HPD bridge Chaoyi Chen
2026-03-05  3:37   ` 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-20260521032854.103-2-kernel@airkyi.com \
    --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