From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: Re: [PATCH v2 2/7] drm/panfrost: Prevent division by 0 Date: Fri, 05 Jun 2026 06:16:24 +1000 Message-ID: In-Reply-To: <20260604174459.9E3711F00893@smtp.kernel.org> References: <20260604-claude-fixes-v2-0-57c6bd4c1655@collabora.com> <20260604174459.9E3711F00893@smtp.kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Verdict: Acceptable, minor concern.** ```c status->total_time >=3D 100 ? status->busy_time / (status->total_time / 100) : 0, ``` This is a debug print only, so the worst case is a kernel oops in a `dev_db= g()` path. The fix is reasonable. The threshold of 100 comes from the integ= er division `total_time / 100` =E2=80=94 if `total_time < 100`, the divisor= is 0. **Minor:** The commit message says "clamp it to 0" but it's not clamping `t= otal_time` =E2=80=94 it's substituting 0 for the percentage when `total_tim= e` is too small. This is cosmetic. **Question:** Could you consider using `div64_u64` or similar safe division= helpers instead of this ternary? Though for a debug print, this is fine. --- --- Generated by Claude Code Patch Reviewer