From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: lib/fonts: Implement font rotation Date: Sun, 12 Apr 2026 13:55:03 +1000 Message-ID: In-Reply-To: <20260407092555.58816-9-tzimmermann@suse.de> References: <20260407092555.58816-1-tzimmermann@suse.de> <20260407092555.58816-9-tzimmermann@suse.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Verdict: Good design, minor style nit.** Introduces `font_data_rotate()` which takes a full font's glyph data and produces a rotated copy. Key design decisions are reasonable: - `steps % 4` for normalization - Buffer reuse via `buf`/`bufsize` parameters (avoids reallocation on repeated rotation) - `check_mul_overflow` for safety - Returns `ERR_PTR` on failure - Restores the bulk `memset` optimization (one memset for the entire output buffer, then per-glyph rotation without zeroing) The `krealloc`-like reuse semantics are well-documented. **Minor**: The switch for `d_cellsize` has no `default` case. While all values 0-3 are covered after `steps %= 4`, some compilers may warn about potentially uninitialized `d_cellsize`. A `default:` matching case 0/2 would silence this. The caller-side refactoring in `fbcon_rotate_font` is clean. The error path correctly handles the case where `font_data_rotate` returns ERR_PTR without freeing the old buffer (the caller frees it). The `fd_size` type change from `u32` to `size_t` is appropriate. --- --- Generated by Claude Code Patch Reviewer