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: analogix_dp: Add validation for samsung, lane-count property Date: Fri, 05 Jun 2026 06:34:43 +1000 Message-ID: In-Reply-To: <20260604085220.2862986-4-damon.ding@rock-chips.com> References: <20260604085220.2862986-1-damon.ding@rock-chips.com> <20260604085220.2862986-4-damon.ding@rock-chips.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Status: Concern =E2=80=94 potential regression for existing DTs without s= amsung,lane-count** The patch changes the `EXYNOS_DP` case from silently tolerating a missing `= samsung,lane-count` to hard-failing with `dev_err_probe`: ```c ret =3D of_property_read_u32(dp_node, "samsung,lane-count", &video_info->max_lane_count); if (ret || !drm_dp_lane_count_is_valid(video_info->max_lane_count)) return dev_err_probe(dp->dev, ret ? ret : -EINVAL, "failed to parse samsung,lane-count\n"); ``` **Issue: `max_lane_count` is zero-initialized** (via `devm_drm_bridge_alloc= ` which zeroes the struct). Previously, if `samsung,lane-count` was missing= , `max_lane_count` stayed 0 and the driver would continue (perhaps not idea= lly, but it wouldn't fail probe). Now it's a hard probe failure. While I co= nfirmed all in-tree Exynos DTs have `samsung,lane-count`, there could be ou= t-of-tree DTs that relied on the old permissive behavior. This is a kernel = regression risk. Additionally, `samsung,link-rate` is NOT validated in the same way =E2=80= =94 it's still silently read with no error check. This asymmetry is a bit i= nconsistent. If `samsung,lane-count` is truly mandatory, perhaps both shoul= d be validated; if the intent is defensive validation, perhaps a `dev_warn`= + fallback to a sane default (like 4 lanes) would be safer than a hard fai= lure. Consider either: 1. Making this a warning with fallback rather than a hard probe error, or 2. Also validating `samsung,link-rate` for consistency. --- Generated by Claude Code Patch Reviewer