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/vblank: Extract get_vblank_counter_and_timestamp() Date: Wed, 25 Mar 2026 07:15:59 +1000 Message-ID: In-Reply-To: <20260323213645.10965-1-ville.syrjala@linux.intel.com> References: <20260323213645.10965-1-ville.syrjala@linux.intel.com> <20260323213645.10965-1-ville.syrjala@linux.intel.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 **Correctness:** The three original do/while loops are identical in structure: ```c do { cur_vblank =3D __get_vblank_counter(dev, pipe); rc =3D drm_get_last_vbltimestamp(dev, pipe, &t_vblank, in_vblank_irq); } while (cur_vblank !=3D __get_vblank_counter(dev, pipe) && --count > 0); ``` The new helper faithfully reproduces this pattern. Two of the three call si= tes (`drm_reset_vblank_timestamp` and `drm_update_vblank_count`) used the r= eturn value (`rc`) =E2=80=94 the refactored code preserves this. **Minor observation:** In `drm_vblank_restore()` (line 1563 in the original= ), the return value of `drm_get_last_vbltimestamp()` was **not** captured: ```c drm_get_last_vbltimestamp(dev, pipe, &t_vblank, false); ``` The new code now captures it via the helper's `rc` return, but the caller d= iscards the return value: ```c get_vblank_counter_and_timestamp(dev, pipe, &cur_vblank, &t_vblank, false); ``` This is harmless =E2=80=94 the return value is simply ignored =E2=80=94 but= it does mean the refactoring subtly changes the code from "never captured"= to "captured then discarded." No functional impact. **Style:** The helper is well-placed (right after `__get_vblank_counter()`)= , the naming is descriptive, and the parameter list matches the existing pa= tterns in the file. **Reviewed-by worthy:** Yes, this is a clean extraction with no behavioral = changes. --- Generated by Claude Code Patch Reviewer