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/i915/edp: Check supported link rates DPCD read Date: Thu, 04 Jun 2026 16:24:48 +1000 Message-ID: In-Reply-To: <20260529145759.1640646-1-n.zhandarovich@fintech.ru> References: <20260529145759.1640646-1-n.zhandarovich@fintech.ru> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: drm/i915/edp: Check supported link rates DPCD read Author: Nikita Zhandarovich Patches: 3 Reviewed: 2026-06-04T16:24:48.707404 --- This is a single-patch series (v2) that adds error checking to the `drm_dp_dpcd_read()` call in `intel_edp_set_sink_rates()`. The patch addresses a real static-analysis finding: the original code unconditionally parsed the `sink_rates[]` array even if the DPCD read failed, potentially using uninitialized stack data. The fix is reasonable and follows the v2 feedback from Jani Nikula to use `drm_dp_dpcd_read_data()` instead of `drm_dp_dpcd_read()` and to avoid a goto. The approach of zeroing the array on failure is safe because the existing loop already treats a zero rate as a terminator (`if (rate == 0) break`), so `memset(sink_rates, 0, sizeof(sink_rates))` will cause the loop to immediately break and set `num_sink_rates = 0`, falling through to default handling. **Verdict: The patch is correct and suitable for merging, with one minor observation below.** --- Generated by Claude Code Patch Reviewer