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/amd/display: Pass up errors reading actual brightness Date: Thu, 04 Jun 2026 14:54:31 +1000 Message-ID: In-Reply-To: <20260531114908.1693426-6-superm1@kernel.org> References: <20260531114908.1693426-1-superm1@kernel.org> <20260531114908.1693426-6-superm1@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Status: Looks fine, minor concern** Clean refactor of error handling. The change from returning cached `dm->brightness[bl_idx]` to returning `-EINVAL` on failure is correct, and the caller in `amdgpu_dm_backlight_get_brightness` now handles the error by falling back to the cached value. However, note that patch 9 later removes the cached `dm->brightness` array entirely. After patch 9, `amdgpu_dm_backlight_get_level` returns `-EINVAL` on failure and `amdgpu_dm_backlight_get_brightness` will propagate that negative value directly to the backlight core as the `get_brightness` callback return. The backlight core interprets negative returns as errors, so this should be fine, but it means the fallback added here is immediately removed two patches later. Consider squashing or reordering. --- Generated by Claude Code Patch Reviewer