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: Thu, 05 Mar 2026 13:37:59 +1000 [thread overview]
Message-ID: <review-patch1-20260304094152.92-2-kernel@airkyi.com> (raw)
In-Reply-To: <20260304094152.92-2-kernel@airkyi.com>
Patch Review
This creates a new module that listens for typec bus events and auto-registers DP HPD bridges when a DP altmode device appears on a Type-C port.
**Issue (medium): Error return from `drm_dp_hpd_bridge_register()` is ignored.**
```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));
```
If bridge registration fails, the caller silently ignores it. At minimum a `dev_err()` or returning `NOTIFY_BAD` would help debugging.
**Issue (minor): `to_typec_altmode()` is called unconditionally on every BUS_NOTIFY_ADD_DEVICE.** This is called for every device on the typec bus, not just altmode devices. If the cast is invalid for non-altmode devices (e.g. typec_port, typec_partner), this could access garbage. The `is_typec_port_altmode()` check happens after the cast. Normally this works because `container_of` is just pointer arithmetic, but it's fragile. Consider checking the device type first.
**Observation:** The `module_exit` function is missing `__exit` annotation:
```c
static void drm_aux_hpd_typec_dp_bridge_module_exit(void)
```
Should be `static void __exit`.
**Observation:** The module has no `MODULE_AUTHOR()`.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-05 3:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
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 Code Review Bot [this message]
2026-03-04 9:41 ` [PATCH v15 2/9] drm/bridge: aux: Add drm_aux_bridge_register_from_node() Chaoyi Chen
2026-03-05 3:37 ` Claude review: " Claude Code Review Bot
2026-03-04 9:41 ` [PATCH v15 3/9] dt-bindings: phy: rockchip: rk3399-typec-phy: Support mode-switch Chaoyi Chen
2026-03-05 3:38 ` Claude review: " Claude Code Review Bot
2026-03-04 9:41 ` [PATCH v15 4/9] phy: rockchip: phy-rockchip-typec: Add typec_mux/typec_switch support Chaoyi Chen
2026-03-05 3:38 ` Claude review: " Claude Code Review Bot
2026-03-04 9:41 ` [PATCH v15 5/9] phy: rockchip: phy-rockchip-typec: Add DRM AUX bridge Chaoyi Chen
2026-03-05 3:38 ` Claude review: " Claude Code Review Bot
2026-03-04 9:41 ` [PATCH v15 6/9] drm/rockchip: cdn-dp: Support handle lane info without extcon Chaoyi Chen
2026-03-05 3:38 ` Claude review: " Claude Code Review Bot
2026-03-04 9:41 ` [PATCH v15 7/9] drm/rockchip: cdn-dp: Add multiple bridges to support PHY port selection Chaoyi Chen
2026-03-05 3:38 ` Claude review: " Claude Code Review Bot
2026-03-04 9:41 ` [PATCH v15 8/9] arm64: dts: rockchip: Add missing dp_out port for RK3399 CDN-DP Chaoyi Chen
2026-03-05 3:38 ` Claude review: " Claude Code Review Bot
2026-03-04 9:41 ` [PATCH v15 9/9] arm64: dts: rockchip: rk3399-evb-ind: Add support for DisplayPort Chaoyi Chen
2026-03-05 3:38 ` Claude review: " Claude Code Review Bot
2026-03-05 3:37 ` Claude review: Add Type-C DP support for RK3399 EVB IND board 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-20260304094152.92-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