From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260304094152.92-2-kernel@airkyi.com> References: <20260304094152.92-1-kernel@airkyi.com> <20260304094152.92-2-kernel@airkyi.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 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