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/panic: Fix panic logo alignment Date: Tue, 31 Mar 2026 17:43:30 +1000 Message-ID: In-Reply-To: <20260329102454.11357-1-dileepsankhla.ds@gmail.com> References: <20260329102454.11357-1-dileepsankhla.ds@gmail.com> <20260329102454.11357-1-dileepsankhla.ds@gmail.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 **Approach**: The patch adds a `drm_rect_translate()` call to horizontally = center `r_logo` after it's initialized by `drm_panic_logo_rect()`. This is = the same pattern used at line 502 for centering `r_msg`. **Correctness**: Since `drm_panic_logo_rect()` initializes the rect at orig= in (0, 0) (see line 457), `r_logo.x2` equals the logo width, so `(sb->width= - r_logo.x2) / 2` correctly computes the left offset for centering. The y-= translation of 0 keeps it at the top. **Potential type concern**: `sb->width` is `unsigned int` and `r_logo.x2` i= s `int` (from `struct drm_rect`). If the logo is wider than the screen, `(s= b->width - r_logo.x2)` could produce a large unsigned value, resulting in a= bad translation. However: 1. The same pattern is already used for `r_msg` at line 502 without a guard. 2. `drm_panic_logo_draw()` (line 468) already checks `rect->x2 > sb->width`= and bails out, so a garbled rect would simply not be drawn. 3. In practice, panic logos are small relative to any screen. So this is not a new issue introduced by this patch. **Nit**: The commit message says "Fix panic logo alignment" which implies t= he current behavior is a bug. It might be more accurate to say "Center pani= c logo" since the left-alignment may have been the original intent rather t= han a bug. But this is subjective =E2=80=94 if the intent was always to cen= ter it, "Fix" is appropriate. **Verdict**: Looks good. The change is minimal, follows existing patterns, = and improves visual consistency of the user-type panic screen. Reviewed-by: No issues found that would block merging. --- Generated by Claude Code Patch Reviewer